Loading...
HTML <dialog> Tag

HTML <dialog> Tag

In this tutorial, we will learn about dialog tag in HTML with the help of examples.


<dialog> Tag

Dialog tag <dialog> is used to create dialog box.
The <dialog> tag is usually used to create popup dialogs on a web page.

Syntax

<dialog>.....</dialog>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Dialog Tag</title>
  </head>
  <body>
    <dialog open>This will be shown in a dialog.</dialog>
  </body>
</html>

Output

This will be shown in a dialog.

Specific Attribute

Attribute Value Description
open open Opens a dialog box so that user can interact with it

Global Attribute

Dialog Tag support all the global attributes of HTML.


Event Attribute

Dialog Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of dialog tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML div Tag.

- Related Topics