TOP CATEGORIES

×

What is details tag in HTML?

V

Vivek Madhur

HTML Tag <details> 

Actually <details> tag is new in HTML5, it is used to specify the additional details that the user can view or hide on-demand on the web page.

Important Points of <details> Tag

  • An <details> element should not be visible unless the open attribute is set.
  • Open & close tags are required in <details> tag
  • The content will be rendered both on older & new browsers that don't support details and in browsers with JavaScript disabled

Syntax Example of <details>

     <details> 

           <summary>Learn Programming Language</summary>

           <p>Basic Level</p>

           <p>Intermediate Level</p>

           <p>Advanced Level</p>

     </details>

Output Look Like

Learn Programming Language

Browser Support <details> Tag

  • Chrome: Yes
  • Edge: Not Supported
  • Firefox: Not Supported
  • Safari: Yes
  • Opera: Yes

0 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)