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
This article is attributed to GeeksforGeeks.org