HTML Introduction | HTML Forms | HTML Button

The button Element

The button element displays a button that users can press.

<button type="button" onclick="alert('You pressed the button.')">
    Please press the button.
</button>

Run code

A button can also be represented with the <input> tag by setting type='button'.