Create Button From HTML Coding

Create Button From HTML Coding


<input type="button'>

How to create HTML button link with onclick and use href link button, and also we are using CSS code for different colors and sizes.




1.HTML Button Code



<form>
<input onclick="window.location.href='https://etechnicaljigyasa.blogspot.com/'" type="button" value="Your Text Here" />


</form>

Output



2. Link Button Inline CSS Styling Code




<form>
<input style="width: 300px; padding: 20px; cursor: pointer; box-shadow: 6px 6px 5px; #999; -webkit-box-shadow: 6px 6px 5px #999; -moz-box-shadow: 6px 6px 5px #999; font-weight: bold; background: #ffff00; color: #000; border-radius: 10px; border: 1px solid #999; font-size: 150%;" type="button" value="Put Your Text Here" onclick="window.location.href='https://etechnicaljigyasa.blogspot.com/'" />


</form>

Output




3. Button Link Internal Stylesheet



HTML Code :- 


<form>
<input class="MyButton" type="button" value="Your Text Here" onclick="window.location.href='https://etechnicaljigyasa.blogspot.com/'" />
</form>

CSS Code :- 
<head>
<style>
input.MyButton {
width: 300px;
padding: 20px;
cursor: pointer;
font-weight: bold;
font-size: 150%;
background: #3366cc;
color: #fff;
border: 1px solid #3366cc;
border-radius: 10px;
}
input.MyButton:hover {
color: #ffff00;
background: #000;
border: 1px solid #fff;
}
</style>
</head>

Output 


Previous
Next Post »