HTML Content Models
HTML script supporting content
Script and template can support application logic or reusable markup without themselves providing normal rendered content. Some strict content models permit these alongside their ordinary children. A template holds inert content until instantiated. Categories describe authoring constraints and may overlap; they do not determine CSS display or by themselves guarantee accessibility.
Formal Syntax & Structure
html syntaxhtml
<template>…</template>Working Example
Example Snippethtml
<ul id="list"></ul><template id="row"> <li>New item</li></template><script> document.getElementById("list").append(document.getElementById("row").content.cloneNode(true));</script>