HTML <template> Element Reference

The HTML <template> element stores inert markup that scripts can clone and insert later.

<template>

HTML <template> Element Reference

The HTML <template> element stores inert markup that scripts can clone and insert later.

Categories

  • Scripting

Tag omission

Consult the HTML Living Standard for the precise tag-omission rules.

Content model

  • Detailed content-model guidance will be added to this reference.

Attributes

Examples

Example

A practical template element example.

<template id="message-template">
  <p class="message"></p>
</template>

Related references

Description

The HTML <template> element stores inert markup that scripts can clone and insert later.

References

  1. HTML Living Standard: Index of elements
  2. MDN: HTML <template> Element

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies