HTML <dialog> tag

Updated: 10/11/2017 by Computer Hope

HTML dialog tagWhen writing in HTML, the <dialog> tag is used to create 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, as well as related attributes and browser compatibility.

Example code

<dialog open>
<p>Hey, I'm a dialog box!</p>

Example result

A dialog box.


Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the current unique HTML attributes for the <dialog> tag, as well as a description of each.

Attribute Description
open Designates that the dialog element is ready for use


Internet Explorer Firefox Safari Opera Chrome
Not supported Not supported 6.0+ 24.0+ 37.0+

Browser, Compatibility, Interactive, Web page, Web design terms