# autofocus

A Boolean attribute requesting focus for an element when its document or dialog becomes active.

## What is **`autofocus`**?

**`autofocus`** — A Boolean attribute requesting focus for an element when its document or dialog becomes active.

Level: Apprentice · [More HTML terms at this level](https://www.ask-codey.com/glossary/subjects/html/apprentice)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/autofocus
