Class Selectors

Class selectors allow you to associate a class with a particular subset, or class, of elements. So if we had the following rule:

p.bold  { font-weight: bold; }

And this HTML:

<p class="bold"> This paragraph will be rendered bold. </p>

The result would be:

This paragraph will be rendered bold.