Interview Question

What is the template tag?

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

💡 Concept ✅ Quick Revision 🌐 HTML

Answer

`<template>` is an element that stores HTML without displaying it immediately. • JavaScript can copy its content when it is needed. • 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

<template id="card"><article>Card</article></template>

⚡ Quick Revision

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