Attributes · autofocus
Which attributes affect autofocus?
Focus requires an eligible, visible element; these attributes affect focus behavior.
| Attribute | What it does | Docs |
|---|---|---|
autofocus | A boolean global attribute that requests focus when the page loads or its containing dialog opens. | MDN |
disabled | A disabled form control cannot receive focus. Enable it before requesting focus. | MDN |
tabindex | Controls whether an element can receive focus and how it participates in keyboard navigation. | MDN |




