Interview Question

What is the summary tag?

`<summary>` should be used for its proper HTML purpose.

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

`<summary>` is the visible label of a `<details>` element. • Clicking it opens or closes the hidden details. • Browsers apply the native parsing and behavior defined for this element. • Using its native meaning helps assistive technology understand the content when the element has accessibility semantics.

💡 Simple Example

<details><summary>Read more</summary>Extra text</details>

⚡ Quick Revision

`<summary>` should be used for its proper HTML purpose.