< Back

Lecture 4: CSS Hierarchy

We can easily use CSS to style individual elements on a webpage. However, that can get very tedious. Luckily, CSS has a heirarchy structure so that we can style classifications of elements without worrying about specifying the style on all of the elements.

New HTML Elements

For the following elements, we will discuss them in class today.

  1. Headings
  2. Horizontal Rules
  3. Divs and Spans

CSS Classes

CSS classes allow us to define our own classifications of things to style. This allows us to use the default style sometimes, and the specific styles only when necessary. Today we will briefly explore this, and cover it in more details on Thursday.

CSS Activity

Using the new CSS classes, try to mimic the page you see here.