/* List items that are children of the "my-things" list */
ul.my-things > li {
margin: 2em;
}Child combinator / notebook
Child combinator
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
<div>
<span>
Span #1, in the div.
<span>Span #2, in the span that's in the div.</span>
</span>
</div>
<span>Span #3, not in the div at all.</span>span {
background-color: aqua;
}
div > span {
background-color: yellow;
}