7 Answers
New AnswerSome people just like to down-vote others without providing a correct alternative. Here's an example of how to style both <button> and <a> WITHOUT JavaScript: <!DOCTYPE html> <html> <head> <style> body { text-align: center; } .button { padding: 10px 25px; margin-bottom: 40px; font-size: 24px; text-align: center; cursor: pointer; outline: none; color: #fff; background-color: #009a9a; border: none; border-radius: 7px; box-shadow: 0 5px #00cdcd; text-decoration: none; } .button:hover { background-color: #008080; } .button:active { background-color: #008080; box-shadow: 0 3px #004d4d; transform: translateY(1px); } </style> </head> <body> <h1>A CSS Styled Button</h1> <button class="button">Click Me</button> <br /> <a href="#" class="button">Click Me</a> </body> </html>
You use css and style a link <a> to look like a button. Take the css course first or just follow an online guide.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message