< All the HTML Tags >

<template></template>

Video Coming Soon...

  • template

    Tag Type

    block

    Tag Category

    content

    Defines reusable content that can be used later with JavaScript.

    Viewed

    1

    Examples

    1

Definition:

The <template> HTML tag defines hidden, reusable HTML content that can be dynamically inserted into a web page using JavaScript. It enables developers to efficiently manage client-side rendering without affecting initial page load times.

Attributes:

Global attributes (e.g., class, id, style)

Accessibility:

Default template Example:

Reusable content fragment
<template><p>This will not display</p></template>

Default template Result:


Community Examples: