HTML - <dialog> tag


Description

The HTML <dialog> tag is used for defining a dialog box.

Example

<!Doctype html>
<html>

   <head>
      <title>HTML dialog Tag</title>
   </head>

   <body>
      <dialog open>this will be shown in a dialog</dialog>
   </body>

</html>

This will produce the following result −

Global Attributes

This tag supports all the global attributes described in HTML Attribute Reference

Specific Attributes

The HTML <dialog> tag also supports the following additional attributes −

Attribute Value Description
open HTML-5 open opens a dialog box and user can interact with it

Event Attributes

This tag supports all the event attributes described in HTML Events Reference

Browser Support

Chrome Firefox IE Opera Safari Android
Yes (Canary) No No No 6.0 No
html_tags_reference.htm
Advertisements