HTML5 <dialog> tag
The <dialog> creates dialog box. It helps in creating components like popup, inspector or modal window in the same browser window.
This is mainly used as a part of application with whom the user can interact.
- show() – To show the dialog box.
- showModal() – Displays the modal dialog.
- close() – Closes the dialog box.
<dialog open>Some text</dialog>
<dialog open>It is a open dialog window</dialog>
Difference between HTML4.01, XHTML and HTML5
|NA||NA||New tag in HTML5|
Attributes used with <dialog> tag
|open||to inform the browser that the dialog window in active.|
The <dialog> tag does supports Global attributes.
The <dialog> tag supports Event attributes.
Mozilla Firefox and Safari have limited support for this tag and started supporting this tag.
The Internet Explorer/Edge does not support this tag.