Buttons in HTML are essential interactive elements that enable users to submit forms, trigger actions, and
navigate between pages. Buttons can be created using the
<button></button>
element or the
<input>
element with specific types. They can be styled and customized to enhance user experience.
The standard
<button></button>
element creates a clickable button that can contain text, images, or other elements.
Within forms you can add a button to submit them in two different ways.
Or a button to reset the form entirely.
The common button attributes are:
-
typedefines the button's behaviour and can take the values of button, submit, or reset. -
disabledmakes a button be disabled by default. This can be useful when combining with JavaScript to enable the button once certain criteria have been met.