HTML <dialog> tag
Updated: 11/13/2018 by Computer Hope
When writing in HTML (hypertext markup language), the <dialog> tag creates a dialog box or modal window on a web page. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.
Example of <dialog> code
<dialog open>
<p>Hey, I'm a dialog box!</p>
</dialog>
Example result
Attributes
All HTML tags support standard attributes that define the settings of an HTML element. In addition to the standard settings, the <dialog> tag has the following unique attributes.
Attribute | Description |
---|---|
open | Designates that the dialog element is ready for use. |
Compatibility
Edge | Internet Explorer | Firefox | Safari | Opera | Chrome |
---|---|---|---|---|---|
Not supported | Not supported | Not supported | 6.0+ | 24.0+ | 37.0+ |
Browser, Compatibility, Container tag, Interactive, Web design terms, Web page