Last updated: 2026-09-12
<dialog>The DIALOG Element
Represents a dialog box or modal, opened via JavaScript showModal()/show().
| Category | Semantic |
|---|---|
| Content Model | Flow content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </dialog> tag |
| Status | Standard |
📝 Syntax
<dialog>dialog content</dialog>
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <dialog> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: showModal() gives a native modal (backdrop + Esc to close); the open attribute shows it non-modally.
🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.