Javatpoint Logo
Javatpoint Logo

HTML <template> tag

HTML <template> tag is used to hold the client-side content that will not render at the time of page load, but it can be instantiated during runtime using JavaScript.

The content of the template will not be displayed until it is not activated using JavaScript. The browser processes the content of the <template> element while loading the page to ensure that the content is valid, the contents are not rendered, however.

It can also be useful when you want to use same content multiple times in your HTML document without any change.

The <template> tag can be placed anywhere inside of <head>, <body>, <frameset>, or <table> elements.

The <template> tag is newly added element in HTML5.


Following are some specifications about the HTML <template> tag

Display None
Start tag/End tag Start and End tag
Usage Formatting


Test it Now


HTML template tag


Tag-specific attributes:

The <template> tag does not contain any specific attribute.

Global attribute:

The <template> tag supports the Global attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
Next TopicHTML textarea Tag

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA