HTML tag
Example
A drop-down list that automatically gains focus:
Try it »
Browser support





Internet Explorer 10, Opera, Chrome, and Safari support the autofocus attribute.
**Note:** Firefox or Internet Explorer 9 and earlier versions do not support the for the tag.
Differences between HTML and XHTML
In XHTML, attribute minimization is forbidden, and the autofocus attribute must be defined as
HTML