Interview Question

What is the details tag?

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

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

`<details>` is an element that can open and close extra information. • It works with `<summary>` as the clickable label. • 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>Answer</summary><p>42</p></details>

⚡ Quick Revision

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