Template Tag

Aug 22, 2022·

1 min read

The contents such as text or elements inside the tag is not shown at first. But, we can add the contents using JavaScript (Web API) to where we want.

The reason it is called 'template' is we can manipulate the data in the contents when we add the contents. So, we don't need to use 'createElement' or 'innerHTML'.

Below is the example.