button tag defines an interactive element that performs an action when activated.
type attribute should always be specified, so the browser will know what type of button it is.
<button type="button">Click Me</button>
Designates that a button should focus on page load.
Designates that a button should be disabled.
Tells the browser which form ID the the button belongs to.
Provides the URL to send the form data when a form is submitted and the button
Provides the method of encoding used (
text/plain) for the form-data before sending it to a server. Only used when button
Designates which HTTP method to use (
post) to send the form-data. Only used when button
Specifies to not validate the form-data when it is submitted. Only used when button
Designates where to open the form response after submission (
_top). Only used when button
Designates the button’s name.
Designates what type of button it is (
Designates the initial value for the button.
Have a code example of
<button>? Submit a codepen.io demo and we'll showcase it here ↴
Help @reference spread the word by sharing this article on Twitter...Tweet This