ways of making buttons in html code example

Example 1: how to add buttons in html

<button type="button" onclick="alert('You pressed the button!')">Click me!</button>

Example 2: how to make a button in html

<!--Button Element-->
<button>This is a Button!</button>
<!--Button with a link-->
<a href="blah blah blah" target="_blank"><button>Button w/ Link!</button></a>

Example 3: ways of making buttons in html

<form action="http://google.com">
    <input type="submit" value="Go to Google" />
</form>

Example 4: ways of making buttons in html

<a href='https://www.freecodecamp.org/'><button>Link To freeCodeCamp</button></a>

Tags:

Html Example