Type, class and ID selectors practice

Paste this code into the BODY of a new HTML document:

    
<p>This is a practice sheet where you need to make some layout changes by using all three different types of selector.  These 
    selectors are:</p>

<ul>
    <li>type - html tags such as p or h1 are all formatted the same</li>
    <li>class - all html tags identified as of one class are formatted the same</li>
    <li>id - html elements are formatted individually based on a unique id tag</li>
    <li>that's all but I wanted four list items</li>
    <li>or maybe five</li> 
</ul>        
        

Create a style section in the HEAD and embed styles to do these things:

By using the three selectors together you can allow for almost any combination of formats. Choosing the best one comes with experience. Pretty much all web pages will use type selectors. Class selectors then allow quick changes to one group of each type by changing just one stylesheet entry. ID selectors allow each individual element of a web page to look different but take more time to update/change.

submit to reddit Delicious Tweet