-
Sequence of rules that define how specific elements in XHTML are styled
- Paragraphs should have a font-size of 16pt
- First paragraph after a header should have first letter of first word
capitalised and colour green
- Paragraphs should start on a newline and have
extra space before next element
- I am old so all the font-sizes should be increased by 2pts on the screen
- Don't add that coloured background when you print it on paper
selector { property : value }
selector1 , selector2 { property1 : value1 ; property2 : value2 }
- Rule has two parts: Selector and Declaration, which consists of Property
:
Value
-
Selector defines which set of XHTML elements it applies to
-
Declaration defines properties to be applied to that set
h1 { color: red } All h1 elements should be coloured red
- Also defines flow for an element
h1 {display:block} Starts with a newline
em {display:inline} Continues on current line