Selectors ( selector
{ property : value } )
Type selectors
tagName : one of the existing HTML tags : all the tags of that sort will
be affected
E.g. : a, li, ul
strong {color: red }
Class Selector
Solitary class selectors
.className : style that will be applied to any area defined
by a surrounding tag or DIV or SPAN
E.g. : .question {font-weight: bold}
<h3 class="question">What are solitary class selectors ?</h3>
<div class="question"><h2>important question</h2><h2>less
important question</h2><div>
<p>And now let's ask the question : <span class="question">Is
it an important question ?<span></p>
tagName.className
selects only a specific type of element of that class
E.g. : h3.question {font-weight: bold}
ID Selector
#tagID
in any valid HTML document there should only be one heading 1 with an ID of
title.
E.g. : #TheQuestion
<h3 id="TheQuestion">What is the difference between id and class
?</H3>
To learn more about selectors : http://westciv.com/style_master/academy/css_tutorial/selectors/index.html