Module 13 · Lesson 2 of 450/60 in the course~18 min
Module lessons (2/4)
Zero-JS Popovers With popover & popovertarget
Lesson preview5 hands-on exercises readyModern HTML & CSS · Top Layer UI, Popovers & Modern Forms
Create light-dismiss tooltips and explicit manual banners declaratively in HTML using popover="auto", "manual", and :popover-open.
What you'll learn in this lesson
- Wire non-modal tooltips, menus, and disclosure cards in pure HTML using
popoverandpopovertargetattributes. - Choose between automatic light-dismiss (
popover="auto") and persistent explicit banners (popover="manual"). - Style active popover overlays cleanly using the
:popover-openCSS pseudo-class.
Overview
Before the HTML Popover API, developers wrote manual click-outside listeners, Escape handlers, and fragile z-index ladders just to show a contextual help tip or menu. Now HTML provides declarative attributes:
Sections covered in this lesson
- 1The Popover API: Zero-JS Top Layer Panels
- 2Choosing
popover="auto"vspopover="manual"
Pro Lesson · Top Layer UI, Popovers & Modern Forms
Unlock "Zero-JS Popovers With popover & popovertarget" and the full Modern HTML & CSS curriculum
Create light-dismiss tooltips and explicit manual banners declaratively in HTML using popover="auto", "manual", and :popover-open.
Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Modern HTML & CSS plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.