HTML | dialog open Attribute
The HTML <dialog> open Attribute is used to specify whether the dialog box should be open or not. It is new in HTML5. It is a Boolean Attribute.
If open, it means the user can interact with it.
Syntax:
<dialog open>
Attribute Values: It accepts two values i.e. true|false which specifies whether a dialog window should be open or not. By default, it is false.
- true: It states that the dialog window is open.
- false: It states that the dialog window is not open.
Example:
<!DOCTYPE html> <html> <head> <style> body { text-align: center; } </style> </head> <body> <h1> GeeksForGeeks </h1> <h3> HTML Dialog open Attribute </h3> <dialog id="Dialog" style="color:green" open> Welcome to GeeksforGeeks </dialog> </body> </html> |
Output:

Supported Browsers: The browsers supported by HTML <dialog> open Attribute are listed below:
- Google Chrome
- Firefox
- Apple Safari
- Opera
Recommended Posts:
- HTML | DOM Dialog open Property
- HTML | open Attribute
- HTML | <details> open Attribute
- HTML | DOM Dialog Object
- HTML | DOM Dialog showModal() Method
- HTML | DOM Dialog close() Method
- HTML | DOM Dialog show() Method
- HTML | DOM open() Method
- HTML | DOM Details open Property
- HTML5 | <dialog> Tag
- How to create a pop-up to print dialog box using JavaScript?
- How to display confirmation dialog when clicking an <a> link using JavaScript / jQuery ?
- HTML | min Attribute
- HTML | dir Attribute
- HTML | <a> rel Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



