Template tag lets you create a HTML partial. By default it doesn't get rendered into the page. Instead, you can use Javascript to manipulate it and inject dynamic content.
#html#tag
<style>.arial{font-family:Arial}.arial-black{font-family:ArialBlack}.comic-sans{font-family:ComicSansMS}.impact{font-family:Impact}.lucida-sans{font-family:LucidaSansUnicode}.font{margin-bottom:24px;}.font__title{padding:6px12px;text-transform:capitalize;}</style><!-- Simple template that serves as a base for our dynamic component --><templateid="font-template"><divclass="font"><divclass="font__title">Title</div></div></template><divclass="container"><divid="font-gallery"><!-- Component will be injected here using Javascript --></div></div><script>// Get template elementconstfragment=document.getElementById('font-template');// This array contains the data we will loop throughconstfonts=[{family:'arial'},{family:'arial-black'},{family:'comic-sans'},{family:'impact'},{family:'lucida-sans'}];fonts.forEach(font=>{// Create an instance of the template contentconstinstance=document.importNode(fragment.content,true);// Add relevant content to the templateinstance.querySelector('.font').classList.add(font.family);instance.querySelector('.font__title').innerHTML=font.family+" font family";// Append the instance to the DOMdocument.getElementById('font-gallery').appendChild(instance);});</script>