Buttons - The <input> Tag

Buttons are used to start an action. To create a button, use the <input> tag. The type attribute is set depending on the type of button you want:

The primary attributes for buttons are:

Note that, for the the first button, I added JavaScript code in the onClick event so that the button would do something when clicked.

<input type="button" value="Button" name="B3" onClick="alert('Hello, World!');">
<p>
<input type="submit" value="Submit" name="B1">
<p>
<input type="reset" value="Reset" name="B2">