Template tag | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 7

Template tag

What is the use of <template> tag

28th Dec 2018, 9:48 AM
Googel
Googel - avatar
3 Answers
+ 4
There is template tag in HTML. <template> tag element is a mechanism for holding client-side content that is not to be rendered when a page is loaded but may subsequently be instantiated during runtime using JavaScript. Check out the usage of template tag from here https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_template2
28th Dec 2018, 12:02 PM
Calviղ
Calviղ - avatar
+ 3
Does it mean the content not to be loaded ?
28th Dec 2018, 12:22 PM
Googel
Googel - avatar
+ 1
It seems the template tag works in both Javascript and php, thanks for the answers.
28th Dec 2018, 9:32 PM
Edwing123
Edwing123 - avatar