CSS

Go to the previous lesson

The language of design

CSS (Cascading Style Sheets) tells the browser how each part of your page should look.

By default, the browser will format some elements in a particular way, but with CSS you have much more control over how something should look and where it is positioned on a page.

CSS is ultimately made up of three parts: the element you want to style, the style property you want to use and the value you want to apply to the property.

element {
property: value;
property: value;
}

Below is an example of some CSS being applied to the main heading (h1) tag:

h1 {
font-size: 22px;
color: red;
}

All CSS properties are in meaningful English. Values can sometimes be English words, numbers with a unit, or colour values in either hex code or RGB values.

Play
Go to the next lesson

style.css

the web page

New Window
Next Section