Published
Edited
Mar 14, 2018
Insert cell
Insert cell
// this doesn't work without the ()s?
html(`
<img
class="example"
srcset="https://placehold.it/300x200 300w"
sizes="(min-width: 932px) 932px, 100vw" />
<p>${ x }</p>
`)
Insert cell
Insert cell
// override the html function...
html = function(str) {
const div = document.createElement('div');
div.innerHTML = str;
return div;
}
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