<template>
Inert HTML held for cloning by script — parsed but not rendered, fetched, or executed.
Baseline: Widely available · Scripting
When to use it
For markup a script will stamp out repeatedly (list items, cards) and for declarative shadow DOM via shadowrootmode.
When not to
Content inside is invisible to the page and to search engines — never put primary content in a template.
Key attributes
shadowrootmode- declarative shadow root (open | closed)
Example
<template id='row'>
<li><span class='name'></span></li>
</template>