w3resource

HTML CSS Exercise: CSS Button

Solution:

HTML Code :

<!doctype html>
<html>
<head>
<title>HTML CSS Exercise - create button with CSS3</title>
<style>
button {
width: 200px;
padding:8px;
background-color: #428bca;
border-color: #357ebd;
color: #fff;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px; /* future proofing */
-khtml-border-radius: 10px; /* for old Konqueror browsers */
text-align: center;
vertical-align: middle;
border: 1px solid transparent;
font-weight: 900;
font-size:125%
}
</style>
<title>Untitled Document</title>
</head>
<body>
<button>Subscribe Now</button>
</body>
</html>

Live Demo :

See the Pen button-answer by w3resource (@w3resource) on CodePen.


Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo
YesYesYesYesYes

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.



Follow us on Facebook and Twitter for latest update.