HTML | <details> open Attribute
The HTML <details> open attribute is used to indicate whether the details will be display on page load. It is a boolean attribute. If this attribute is present then the detail will be visible.
Syntax:
<details open> Contents... </details>
Example: This example illustrates the use of open attribute in <details> element.
<!-- HTML program to illustrate deltals open Attribute --> <!DOCTYPE html> <html> <head> <title>HTML details open Attribute</title> </head> <body> <h1 style="text-align:center;"> GeeksForGeeks </h1> <h2 style = "color: green; text-align: center;"> HTML <Details>open Attribute </h2> <!-- Below details tag has "open" attribute --> <details open> <summary>Geeks classes</summary> <p> An extensive classroom programme to build and enhance Data Structures and Algorithm concepts. </p> </details> </body> </html> |
chevron_right
filter_none
Output :

Supported Browsers: The browser supported by HTML <details> open attribute are listed below:
- Google Chrome 12.0
- Firefox 49.0
- Safari 6.0
- Opera 15.0
Recommended Posts:
- HTML | open Attribute
- HTML | DOM open() Method
- HTML | DOM Details open Property
- HTML | DOM Dialog open Property
- HTML | for Attribute
- HTML | value Attribute
- HTML | <img> src Attribute
- HTML | <li> value Attribute
- HTML | min Attribute
- HTML | low Attribute
- HTML | <map> name Attribute
- HTML | dir Attribute
- HTML | <img> alt Attribute
- HTML | <a> rel Attribute
- HTML | autofocus 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.



