HTML <template> tag
HTML <template> tag
The <template>
tag holds the HTML content hidden from the browser.
The HTML content inside a <template>
tag will not to be rendered immediately when a page is loaded.
The HTML content inside a <template>
tag can be made visible and rendered later by using JavaScript.
Basic Example
In the following example, we will have the HTML content to be rendered later by using JavaScript.
Example
Rendering Hidden HTML Content
In the following example, we will render the hidden HTML content inside a <template>
tag by using JavaScript.
Example
Attributes
There is no special attributes for <template> tag. Only Global attributes.
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.