Cascading Style Sheets

HTML is used to specify what is to be shown on a page.

CSS is used to format the page.

CSS stands for Cascading Style Sheets

 

CSS Syntax

CSS commands have two components:

  • a selector
    the names of the objects to be formatted
  • a declaration block
    the formatting details

Example: change the font and colour for heading1s and heading2s:

    h1, h2 {
        font-family: 'Trebuchet MS', sans-serif;
        color: orange;
    }