Kevin Powell - CommunityKP-C
Kevin Powell - Communityβ€’4mo agoβ€’
22 replies
Faker

Template tag in HTML and its uses

Hello, didn't know that template was an html tag until now. Just read a bit about it. From what I've understood, we can think of it like a normal div element, it will be in the DOM ect except that its content won't be visible to the users. In order to make it visible, we must use javascript and "clone" it I think and this way it will be visible?

Can someone confirm if the above statement is correct pls, feel free to add up to it if needed.

Also, what about its use case? Why not just use a div with display being changed each time we need to make something visible or not pls
Was this page helpful?