HTML & CSS · Senior · Question 35 of 75

What does the inert attribute do?

Explanation

inert is the native way to "switch off" part of a page: for example, the main content while a drawer is open. Previously you had to manually set tabindex="-1" on every focusable element plus aria-hidden. A modal <dialog> makes the rest of the document inert automatically.

Further reading

Problem with a question

HTML & CSS · Senior · question 35

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz