Interview Question

What is tabindex?

Tabindex controls keyboard focus; use positive values carefully.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

The `tabindex` attribute controls whether an element can receive keyboard focus and its focus order. β€’ It is written inside an element’s opening tag. β€’ The HTML Standard limits which elements may use it and which values are valid. β€’ Browsers apply the attribute when they process the element or the resource it controls.

💡 Simple Example

<div tabindex="0">Focusable panel</div>

⚡ Quick Revision

Tabindex controls keyboard focus; use positive values carefully.