CASCADING  STYLE  SHEETS
CASCADING  STYLE  SHEETS


Week Three


Combining Selector Types


This h2 was originally purple like the "Week Three" text above. With a Class applied, the color is now dark red.


This paragraph is purple, uses a Verdana Font and the text is justified. This was set up in my Style Rules.


This paragraph has been altered using a Combined Selector which changes the font color to fuschia, and the font weight to bold.


Contextual Selectors


This paragraph is purple as set up in my Style Rules. My <em> tag is also purple so I set up a rule to change it to dark red when it's inside a paragraph. That way, I can emphasize certain words in red text, but only when they're inside <p> tags. I've also used Inline Style Syntax to change the Line Height of this paragraph. Notice how the spacing looks different than my other paragraphs.


The following List uses Contextual Selectors to change the appearance of several elements in the nested lists below, including the font color and the list item style.


  • This is an Unordered List
  • The text color is purple
    • Nested Color is Blue
    • Style Type, Square Bullet
  1. This is an Ordered List
  2. This is the second item
    1. Nested Color is Blue
    2. Style Type, Upper Roman

Index Week 1 Week 2 Week 3 Week 4 Week 5 Week 6


Copyright  Peggy Sue  2004