The <details> tag is used for the content/information which is initially hidden but could be displayed if the user wishes to see it. This tag is used to create interactive widget which user can open or close it. The content of details tag is visible when open the set attributes.
<details> <summary> Text content </summary> <div> Content . . . > </details>
Attribute The detail tag has an attribute called open which is used to display the hidden information by default.
<details open> <summary> Text content </summary> <div> Content . . . > </details>
Browser Support: Since this tag is included in HTML 5, so all the browsers does not support this tag.
The browsers which supports this tag are:
- Google Chrome 12.0 and above
- Safari 6.0 and above
- Opera 15.0 and above
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.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.