Create a document container
Container is a dom element what has wrapper and then children inside, useful because fragments dont have all dom manipulation possibilities
const container = html`
element1
element2
Text example
`;
document.body.appendChild(container);
Create a SVG element
const circle = html``;
document.body.appendChild(circle);
Create a Array element
const array = html`
${["data1", "data2", "data3"].map(item => `${item}`).join("")}
`
document.body.appendChild(array);
Create a embeded Array element
const array2 = html`
${["data1", "data2", "data3"].map(item => html`${item}`)}
`
document.body.appendChild(array2);
Add one element inside other one
const selection = html``
const selection_container = html`'
Select your options
${selection}
' `
document.body.appendChild(selection_container);
Usually you’ll have to provide an outer container that wraps your element. But if you wish to create elements without outer container, you can create a document fragment
Document fragments are elements without a real container Document Fragment
the tag <data-fragment&rt; is only used to differenciate fragments and will not be rendered
const fragment = html`
Click me!
Element2
Element3
`;
document.body.appendChild(fragment);