html tutorial - <dialog> Tag in HTML - html5 - html code - html form

dialog tag

Learn html - html tutorial - dialog tag - html examples - html programs

  • <dialog> tag is used to define the window or dialog box.
  • The popup dialogs and modals on a web page are easily to create by using <dialog> tag.
  • <dialog> tag supports Global and event attributes.
  • <dialog> tag belongs to Flow content and Sectioning Content category.

Syntax for <dialog> tag:


Differences between HTML 4.01 and HTML 5 for <dialog> tag in HTML:

HTML 4.0.1

  • HTML 4 is does not support <dialog> tag.


  • HTML 5 is support <dialog> tag.

Sample Coding for <dialog> tag:

Tryit<!DOCTYPE html>
        <title>Wikitechy dialog Tag</title>
        <dialog open>This is a Wikitechy dialog Window.</dialog>

Code Explanation for <dialog> tag:

<dialog> Tag Code Explanation

  1. <dialog> tag is used to create a dialog box.
  2. The open attribute is used to display the dialog box. If the open attribute not set the dialog box in the closed state.

Output for <dialog> tag:

<dialog> Tag Output

  1. The dialog is displayed as “This is a Wikitechy dialog Window”.

Attribute of <dialog> tag:

Attribute Value HTML4 HTML5 Description
open open No Yes Defines that the dialog box should be active and available for interaction to the user.

Browser Support for <dialog> tag in HTML:

37.0 No No No 24.0

Related Searches to dialog tag in html