<h1>My blog</h1>
<article>
<h2>Heading of a nice article</h2>
<p>Content here.</p>
</article>
<article>
<h2>Another heading of another article</h2>
<p>More content here.</p>
</article>Using CSS containment / notebook
Using CSS containment
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
article {
contain: content;
}article {
contain: layout;
}article {
contain: paint;
}article {
contain: size;
}article {
contain: size;
contain-intrinsic-size: 100vw auto none;
}article {
contain: style;
}article {
contain: strict;
contain-intrinsic-size: 80vw auto none;
}article {
contain: size layout paint style;
contain-intrinsic-size: 80vw auto none;
}