The details tag in HTML
- 24-07-2022
- Trung Minh
- 0 Comments
The details tag will define additional details that can be hidden by the user upon request.
The details tag can be used to create an interactive widget that the user can open and close. Any content type can be placed inside the details tag.
The contents of the details tag pair will not be displayed, unless the open attribute is set.
How to use the details . tag
For example , use the details tag to create an interactive widget.
<!DOCTYPE html> <html> <head> <title>Học lập trình miễn phí tại web888.vn</title> <meta charset="utf-8"> </head> <body> <h1>Học lập trình miễn phí tại web888.vn</h1> <details> <summary>Copyright 1999-2014.</summary> <p> - by Refsnes Data. All Rights Reserved.</p> <p>All content and graphics on this web site are the property of the company Refsnes Data.</p> </details> <p><b>Note:</b> The details tag is not supported in Internet Explorer.</p> </body> </html>
Attributes of the details . tag
open – specifies the content in the details tag to be displayed to the user.