DEV Community


Discussion on: Are native html reusable templates a thing?

ogranada profile image
Andres Granada • Edited

According the MDN reference ( 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.

Forem Open with the Forem app