How to define additional details that the user can view or hide?
In this article, we define additional details that the user can view or hide By using the details Element in The Document, It 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 an interactive widget that the user can open or close it. The content of the details tag is visible when open the set attributes.
<details> <summary> Text content </summary> <div> Content . . . </div> </details>
Before clicking on details Element:
After Clicking On Button:
Supported Browsers are listed below:
- Google Chrome
- Internet Explorer
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.