HTML <button> autofocus Attribute
Example
<button type="button" autofocus>Click Me!</button>
Meaning
The autofocus is boolean attribute is used for autofocus when the page loads.
Standard Syntax
<button type="button|reset|submit" autofocus>
Advertisement
Attribute Values
| Value | Description |
|---|---|
| autofocus | This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value. |