<template id="template">
<p class="template-p">template paragraph</p>
</template>
<div class="wrapper">
<div id="container"></div>
</div>
.wrapper {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
}
View Compiled
const template = document.getElementById("template");
const container = document.getElementById("container");
container.appendChild(template.content.cloneNode(true));
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.