HTML · Forms and controls
button
A clickable control. Set type explicitly: submit inside a form, button everywhere else.
Syntax
<button type="button">…</button>Example
Try it
Notes
Use a button for actions and a link for navigation. A div with a click handler is not a button.
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.