HTML Code :
<!doctype html>
<html>
<head>
<title>HTML CSS Exercise - create button with CSS3</title>
<style>/* Begins CSS styling */
/* CSS comments: Define the style for the button */
button {
/* CSS comments: Set the width, padding, background color, border color, text color, and border radius for the button */
width: 200px;
padding:8px;
background-color: #428bca;
border-color: #357ebd;
color: #fff;
-moz-border-radius: 10px; /* CSS comments: Define border radius for Mozilla Firefox */
-webkit-border-radius: 10px; /* CSS comments: Define border radius for WebKit browsers */
border-radius: 10px; /* CSS comments: Define border radius for future proofing */
-khtml-border-radius: 10px; /* CSS comments: Define border radius for old Konqueror browsers */
text-align: center;
vertical-align: middle;
border: 1px solid transparent; /* CSS comments: Define border as transparent */
font-weight: 900;
font-size:125%
}
</style>
<title>Untitled Document</title>
</head>
<body>
<button>Subscribe Now</button>
</body>
</html>
Explanation:
Live Demo :
See the Pen button-answer by w3resource (@w3resource) on CodePen.
Supported browser
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4