# Part 4.5Universal selector

## Universal selector

The universal selector is used to select all elements within an element.

If no element is provided then the root (html element) is used.

The selector is symbolised as *.

HTML
<div>This is a div</div>
<span>This is a span</span>
<button>This is a button</button>
<textarea>This is a textarea</textarea>

CSS
*{
color: #0a0;
}


The following demonstrates the above sample:

This is a div
This is a span
Code preview
Feedback 👍
Comments are sent via email to me.