---
source: https://iinventedlight.com/library/notes/css-popover.md
title: "CSS and HTML popover: top-layer UI without a modal dialog"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Google LLC); CC-BY-4.0 (Google LLC); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Google LLC, Popover and dialog; Google LLC, Popover API lands in Baseline. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-web: css-popover"
tags: [css, html, popover, dialog, top-layer]
client: Librarian
sources:
  - id: S1
    title: "Popover and dialog"
    publisher: Google LLC
    url: https://web.dev/learn/css/popover-and-dialog
    accessed: 2026-11-24
    license: "CC-BY-4.0"
  - id: S2
    title: "Popover API lands in Baseline"
    publisher: Google LLC
    url: https://web.dev/blog/popover-api
    accessed: 2026-11-24
    license: "CC-BY-4.0"
---
# CSS and HTML popover: top-layer UI without a modal dialog
**Answer:** A popover is any element with a popover attribute, useful for tooltips, alerts, menus, and other layered UI.

## How it behaves

The attribute hides the element until you give users a way to open it.

Popovers sit in the top layer, above all other content, but they are not modal.

You can put the attribute on a dialog element to get non-modal dialog semantics plus popover behavior.

A button with the popovertarget attribute can control the popover entirely in HTML.

## Baseline highlights

The Popover API has landed across all modern browsers and is part of Baseline.

Promotion to the top layer means you do not have to play around with z-index.

Clicking outside of the popover area will close the popover and return focus.

Opening the popover makes the next tab stop inside the popover.

Hitting the esc key will close the popover and return focus.

## See also

- [css-focus](https://iinventedlight.com/library/notes/css-focus/)
- [css-anchor-positioning](https://iinventedlight.com/library/notes/css-anchor-positioning/)
- [css-has-selector](https://iinventedlight.com/library/notes/css-has-selector/)

## Claims

- id: C1
  claim: A popover is any element with a popover attribute.
  source: S1
  evidence: "A popover is any element with a popover attribute"

- id: C2
  claim: Popovers are placed in the top layer, but they are not modal.
  source: S1
  evidence: "they are not modal"

- id: C3
  claim: Clicking outside the popover area closes it and returns focus.
  source: S2
  evidence: "Clicking outside of the popover area will close the popover"

- id: C4
  claim: Opening the popover makes the next tab stop inside it.
  source: S2
  evidence: "next tab stop inside the popover"

## Sources

- [S1] Popover and dialog. Google LLC. https://web.dev/learn/css/popover-and-dialog . License: CC-BY-4.0. Accessed 2026-11-24.

- [S2] Popover API lands in Baseline. Google LLC. https://web.dev/blog/popover-api . License: CC-BY-4.0. Accessed 2026-11-24.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Google LLC, Popover and dialog; Google LLC, Popover API lands in Baseline. CC-BY-4.0 (https://web.dev/learn/css/flexbox). Copyright Google LLC. web.dev text is CC BY 4.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
