DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,274 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in

Discussion on: Are native html reusable templates a thing?

Collapse
 
ogranada profile image
Andres Granada • Edited on

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.