Cascading Styles

The cascade is an important part of CSS. It controls what styles are applied to an element on the page, based on the order of the styles.

Like a cascading waterfall, styles are read from top to bottom, and will apply until something else comes along and interrupts them.

Look at the CSS here, and look at the HTML. It may help to open this in a new window to edit it so you can show the preview to the right of your code. Complete the following:

  1. Identify the emphasized text. What color do you think it should be? Why?
  2. Identify the strong text. What color do you think it should be? Why?
  3. According to the cascading styles rule, line 25 should override lines 21 and 17 in the CSS. What can you see that is different in the code that may have changed this behavior?
  4. Why is the first paragraph larger than the others? Identify the HTML and CSS that allows this to happen.
  5. Change the strong text to a violet color.