TOP CATEGORIES

×

What is the difference between details and summary tag?

S

Sandeep Singh

Difference Between details and summary Tag

In HTML details tag and summary tag are used together to achieve the task. The combination of the <details> tag and <summary> tag is generally used to provide additional details about anything in such a way that it can be opened or closed on click to read the additional details.

Let's see how we can use details and summary tags in HTML

<details>

  <summary>Your Summary Heading</summary>

  <p>Your detailed description goes here, you can write any information here it will be hidden, only by expanding anyone can see this information or message</p>

</details>

Main Difference Between details and summary Tag

  • <details> tag is used to provide additional information about anything whereas the <summary> tag is used within the <details> tag to provide the title/heading for <details> tag.
  • <details> tag can be used without <summary> tag whereas <summary> tag can't used without <details> tag.

0 votes

Your Answer

Email: advertise@gdatamart.com

Donate: To Support US

© 2024 GDATAMART.COM (All Rights Reserved)