HTML & CSS · Senior · Question 53 of 75

What does the popover attribute give you?

<button popovertarget="menu">Menu</button>
<div id="menu" popover>...</div>

Explanation

The top layer sits above all z-index stacking contexts, so overflow and stacking bugs disappear. Unlike <dialog> with showModal(), a popover doesn't make the rest of the page inert.

Further reading

Problem with a question

HTML & CSS · Senior · question 53

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