DEV Community

Discussion on: Are native html reusable templates a thing?

Collapse
 
ogranada profile image
Andres Granada • Edited

According the MDN reference (developer.mozilla.org/en-US/docs/W...) a template is a way to put html code that won’t be rendered unless you extracted and make it rendereable using JavaScript.

I think it is a way to give a sort of hierarchy and order to your vanilla projects and avoid to parse a lot of strings (with a parser or using innerHTML) in your JavaScript code.