template

Holds HTML that is not rendered but can be cloned via JavaScript.

Description

The <template> element is part of the Scripting category in HTML.

Basic Example

Template content is not rendered until cloned via JavaScript.

Attributes

This element supports global attributes.

Accessibility

Accessibility considerations for the <template> element will be documented here.

Related

  • <slot> - Content projection in web components
  • <script> - Execute JavaScript code