Easy Tutorial
❮ Att Button Autofocus Att Iframe Width ❯

HTML <select> autofocus Attribute

HTML <select> Tag

Example

A dropdown list that automatically focuses:


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 autofocus attribute for the <select> tag.


Definition and Usage

The autofocus attribute is a boolean attribute.

The autofocus attribute specifies that the dropdown list should automatically get focus when the page loads.


Differences Between HTML 4.01 and HTML5

The autofocus attribute is a new attribute of the <select> tag in HTML5.


Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the autofocus attribute must be defined as <select autofocus="autofocus">.


Syntax

❮ Att Button Autofocus Att Iframe Width ❯