Platform
Resources
Pricing
Sign in
Get started
Michiel Dral
I don't actually know how to program I just ask @FransAris
Workspace
Fork
Published
By
Michiel Dral
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
example_with_whitespaces
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
example_without_whitespaces
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
example_fragment_with_whitespaces
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
example_fragment_with_multiple_elements
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
example_innerhtml_self_closing
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
show_tree
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
format_element
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
htl
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML