HTML Templates

E856207

HTML Templates are a web platform feature that lets developers define inert chunks of HTML markup for later cloning and insertion into the DOM, enabling efficient, reusable UI structures.

All labels observed (2)

Label Occurrences
HTML Templates canonical 2
HTMLTemplateElement 1

How this entity was disambiguated

Statements (48)

Predicate Object
instanceOf DOM feature ⓘ
HTML feature ⓘ
Web platform feature ⓘ
associatedDOMInterface HTMLTemplateElement ⓘ
benefit Avoids string-based HTML concatenation in JavaScript ⓘ
Improves maintainability of markup ⓘ
Reduces DOM construction overhead ⓘ
browserSupport Supported by all modern browsers ⓘ
canContain Any valid HTML content ⓘ
Custom elements ⓘ
Script elements ⓘ
Style elements ⓘ
contentIs Inactive until cloned or inserted ⓘ
Not part of the main document DOM tree ⓘ
Not rendered when parsed ⓘ
contentStoredIn DocumentFragment ⓘ
contentType DocumentFragment node ⓘ
definedBy HTML Living Standard ⓘ
enables Efficient DOM insertion ⓘ
Reusable UI structures ⓘ
hasCharacteristic Inert images and media do not load until inserted ⓘ
Inert scripts inside templates do not execute until moved into document ⓘ
Styles inside templates do not apply until inserted ⓘ
hasElementName template ⓘ
hasProperty content ⓘ
introducedIn HTML5 era ⓘ
lifecycle Parsed once and cloned many times ⓘ
parsingBehavior Content not executed or loaded until adopted into document ⓘ
Content parsed but not rendered ⓘ
primaryUse Cloning and inserting predefined DOM structures ⓘ
Defining inert chunks of HTML markup ⓘ
standardizedBy W3C HTML Working Group (historically) ⓘ
linked to: W3C Working Group

WHATWG ⓘ
supports Client-side templating patterns ⓘ
Declarative definition of DOM subtrees ⓘ
Lazy instantiation of UI ⓘ
Shadow DOM composition patterns ⓘ
Web Components usage ⓘ
supportsMethod Node.cloneNode ⓘ
content.cloneNode ⓘ
usedFor Client-side rendering ⓘ
Cloning repeated list items ⓘ
Predefined dialog or widget markup ⓘ
Separating structure from data ⓘ
usedWith JavaScript ⓘ
Shadow DOM ⓘ
linked to: Web Components

Web Components ⓘ
usesHTMLTag <template> ⓘ

How these facts were elicited

Referenced by (3)

Full triples — surface form annotated when it differs from this entity's canonical label.

Open Web Platform → hasComponent → HTML Templates ⓘ
Web Components → hasComponent → HTMLTemplateElement ⓘ
linked to: HTML Templates
Custom Elements → relatedTo → HTML Templates ⓘ