:heading {
/* ... */
}`:heading` CSS pseudo-class / notebook
`:heading` CSS pseudo-class
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<h1>Mastering CSS</h1>
<h2>Chapter 1: Selectors</h2>
<p>
A CSS selector is the part of a CSS rule that describes what elements in a
document the rule will match.
</p>
<h3>1.1 Pseudo-classes</h3>
<p>
CSS pseudo-classes enable selecting elements based on information that lies
outside of the document tree.
</p>:heading {
color: tomato;
font-style: italic;
}