selector::pseudo-element {
property: value;
}Pseudo-elements / notebook
Pseudo-elements
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
/* The first line of every <p> element. */
p::first-line {
color: blue;
text-transform: uppercase;
}