Cascading Style Sheets

清晨帘幕卷轻霜,呵手试梅妆。

欧阳修·诉衷情

CSS locations

  • inline
  • internal
  • external

Selectors

Box model

CSS box model
CSS box model (courtesy of Wikipedia)

Colors

HTML Color Codes


Exercises

  1. Create an HTML page and an external CSS file, link the CSS file in the HTML header.
  2. In the above page, add 3 paragraphs. In the above CSS file, add a style by name, a style by class, and a style by id. Apply the 3 styles to the 3 paragraphs.
  3. In the above page, add 3 paragraphs. In the above CSS file, add 3 color styles. Apply the 3 colors to the 3 paragraphs.