CSS
CSS allows the styling of websites to make them look better and be more accessible and interesting to end users.
Key Points
CSS allows for websites to be styled.
To add style to an element, rules must be written.
Rules are made up of:
- Selectors
- Properties
- Values
How to use CSS rules
Styles are applied to elements through the use of rules. Every rule is made up of three components:
- Selector – How an element is told to look a certain way
- Property – The part of the element that will be styled
- Value – The value of the property that will be applied
The example below changes all heading 1’s to change their colour red:
- h1 is the selector
- color is the property
- red is the value

Selector
Property
Value
Styling different HTML elements
Every HTML element can be styled in a variety of different ways. At National 5, there are a limited number of elements that you need to be able to apply styles.
Each HTML element has its own dedicated page with examples of CSS.