Published
Edited
Apr 11, 2021
Insert cell
md`# How to override an ID selector in CSS`
Insert cell
Insert cell
{
yield html`
<div id="foo">Some text</div>
<style>
#foo{
color: red;
}
</style>
`
}
Insert cell
Insert cell
Insert cell
{
yield html`
<div id="bar"> Some text</div>
<style>
#bar {
color: red;
}
/** uncomment the line below **/
/**div#bar{ color: green;}**/

</style>`
}
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