William P. Craft

This Unit:

Reading Assignment:

Read Chapter Nine and do the exercises. This chapter has techniques that you will use every day as you build web pages. The concepts are fairly basic, but there is a lot to cover.

When you get to the section about color, you will note that there are several ways to specify color. Although you can use names like "red" doing so limits you to only 17 colors. As you read through the chapter the book will discuss several other ways.

Pay particular attention to the hex code variation since it is the most widely used. However, at the end of the day, you will not have to know how to do the "math" to turn a color into hex.

Programs such as Photoshop Elements, Dreamweaver, and hand-coding programs (my favorite: HTMLPad 2010) have "color picker" functions which will do the math for you automatically. There are also free color picker programs available on the web. (Try Colorzilla for Firefox.)

Discussion:

None this unit.

Quiz:

Take the quiz.

Assignment:

For Unit Nine, modify the CSS in the External Style Sheet you did for your Unit Eight Assignment as outlined below:

  1. Change the rules for the following elements:
    • body: Make the font-size medium and make the color of the text a dark blue. Specify the color in hex code in your style sheet. Chose a font-family that is NOT sans-serif. Make sure all the specific fonts you list are actually members of the font-family you chose. The last font listed in the family should be the "generic" font for the family.
    • h1: specify the font-size in em's so that the h1 is bigger than the h2 element. Use your judgement as to what size looks good.
    • h2: specify the font-size in em's so that the h2 is bigger than the body element. Use your judgement as to what size looks good.
    • p: use the default size and color for the page.
  2. Last unit you defined a class that applied to two "p elements" in your webpage. This unit make the text in those paragraphs: red. Specify the color in hex format in your style sheet.
  3. Validate your external style sheet by using the W3C CSS Validator. Make sure you have the links for both XHTML and CSS validation at the bottom of your page.

Post your revised XHTML page on your website and send me the exact address of that page in the comments section of the assignment on WebCT.

The due date for the Quiz and the Assignment is listed on the home page of the course.

...Bill