YouTip LogoYouTip

Att Select Autofocus

# HTML ` element's `autofocus` attribute is a powerful, user-friendly feature introduced in HTML5. It allows developers to specify that a drop-down list should automatically receive focus when the web page finishes loading. --- ## Definition and Usage The `autofocus` attribute is a **boolean attribute**. When present, it automatically directs the user's keyboard and screen focus to the designated ` ``` ### HTML vs. XHTML Difference In XHTML, attribute minimization is forbidden. If you are writing XHTML-compliant code, the `autofocus` attribute must be defined with its value explicitly declared: ```xml

``` --- ## Browser Support The `autofocus` attribute is widely supported across modern web browsers: | Browser | Supported Version | | :--- | :--- | | **Google Chrome** | Yes | | **Microsoft Edge / IE** | Internet Explorer 10+ | | **Firefox** | Yes | | **Safari** | Yes | | **Opera** | Yes | > **Note:** Legacy browsers such as Internet Explorer 9 and earlier do not support the `autofocus` attribute on the `