HTML <dialog> Tag
Example
<dialog open>This is an open dialog box</dialog>
Meaning
The <dialog> element defines a dialog box or subwindow, it makes easy to create popup dialogs and modals on a web page.
Version: HTML5
Standard Syntax
<dialog>...</dialog>
Browser Support
Status
Attributes
Attribute | Value | Description |
---|---|---|
open | open | It specifies that the dialog element should be active or not. |
Global Attributes
<dialog> element also supports the Global Attributes in HTML.
Event Attributes
<dialog> element also supports the Event Attributes in HTML.
More Example
Example
<dialog open>
<p>Greetings, one and all!</p>
<form method="dialog">
<button>OK</button>
</form>
</dialog>