HTML dialog Tag defines a dialog box which is hidden by default. The html dialog box is a separate area which can act as a popup window.
Table of Contents
Syntax of HTML dialog Tag
The Syntax of HTML dialog Tag is shown below, It has both starting and ending tags.
<dialog>This is a dialog box.</dialog>
Usage of HTML dialog Tag
HTML dialog Tag is used to make a dialog box or a sub window. HTML dialog tag can also be used as a modal or a popup.
HTML dialog tag is hidden by default.
open attribute is used to display the dialog box.
Browser Support for HTML dialog Tag
HTML dialog Tag is supported by all major browsers except Safari.
Global Attributes Support in HTML dialog Tag
The HTML dialog Tag supports all Global Attributes.
Event Attributes Support in HTML dialog Tag
The HTML dialog Tag supports all Event Attributes.
HTML dialog Tag Video
Watch our video on HTML dialog Tag and subscribe our Youtube Channel.
Example of HTML dialog Tag
Simple example of HTML dialog Tag is shown below.
<dialog open>This is a dialog box.</dialog>
Output
The output of above HTML code is shown below.