Published
Edited
Feb 11, 2021
Insert cell
Insert cell
Insert cell
Insert cell
example_with_whitespaces = htl`
<should-contain-a-div>
${htl`
<should-be-contained-in-a-div />
`}
</should-contain-a-div>
`
Insert cell
Insert cell
Insert cell
example_without_whitespaces = htl`
<should-contain-a-div>
${htl`<should-be-contained-in-a-div />`}
</should-contain-a-div>
`
Insert cell
Insert cell
Insert cell
example_fragment_with_whitespaces = htl`
<should-contain-a-div>
${htl.fragment`
<should-be-contained-in-a-div />
`}
</should-contain-a-div>
`
Insert cell
Insert cell
Insert cell
example_fragment_with_multiple_elements = htl`
<should-contain-a-div>
${htl.fragment`<div></div><should-be-contained-in-a-div></div><div></div>`}
</div>
`
Insert cell
Insert cell
Insert cell
example_innerhtml_self_closing = {
let div = DOM.element('div');
div.innerHTML = `
<should-contain-a-div>
<div />
<should-be-contained-in-a-div />
<div />
</should-contain-a-div>
`;
return div;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more