/* Selects all elements */
* {
color: green;
}Universal selectors / notebook
Universal selectors
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
* { style properties }<p class="warning">
<span lang="en-us">A green span</span> in a red paragraph.
</p>
<p id="maincontent" lang="en-gb">
<span class="warning">A red span</span> in a green paragraph.
</p>* [lang^="en"] {
color: green;
}
*.warning {
color: red;
}
*#maincontent {
border: 1px solid blue;
}
.floating {
float: left;
}
/* automatically clear the next sibling after a floating element */
.floating + * {
clear: left;
}@namespace example url("http://www.example.com/");
example|* {
color: blue;
}