Hands On Practice 3.5 Exercise

Click Here to View Finished Exercise

 


Chapter 3

Configuring Color and Text with CSS

Hands On Practice 3.5 P.93

In this exercise I learned how to work with Div and Span tags. I configured the navigational area and the company name. All I did was edit the code presented in the previous exercise Hands On Practice 3.4. I replaced the navigational <p> paragraph tag with a div tag. See Div Tag Code Example below. Div tags are used when you would like to apply a different set of rules to a certain area of a web page. In this case it would be the navigational area. This would be where it says Home, Services and Contact. Although you cannot see a difference cosmetically, it is better semantically in the code or under the hood. I added a class called "companyname" and applied it to Trillium Media Design. Please see Span Tag Code Example below.

Div Tag Code Example
<div class="nav"><a href="index.html">Home</a> <a href="services.html">Services</a> <a href="contact.html">Contact</a></div>

Span Tag Code Example
<span class="companyname">Trillium Media Design</span>