HTML and buttons and autofocus properties
The autofocus property is set with a button that automatically gets focus after the page loads, refer to the following example:
Browser support
Internet Explorer 10, Firefox, Chrome, and Safari support autofocus properties.
Note: Autofocus properties are not supported by Internet Explorer 9 and earlier versions of IE.
Definitions and usages
The autofocus property is a boolean property.
The autofocus property states that the button should automatically get focus when the page loads.
Tips:
The difference between HTML 4.01 and HTML5
The autofocus property is the new property of the HTML5 and lt;button.gt; tags.
The difference between HTML and XHTML
In XHTML, properties are not allowed to be short-written, and autofocus properties must be defined as .lt;button autofocus."autofocus"."
Grammar
HTML slt;button-and-label