Home | Interests | CSS Style Sheets 1 | CSS Style Sheets 2
The H1 and H2 have the same colour
but are declared seperately
whereas H3 and H4 are a single rule
using multiple selectors seperated by commas for the same colour
Font color set with colored background
H1 rule specifies that i elements appear blue within H1 elements
The CLASS attribute, i.e dot quote = red colour text, lets you write rules and then apply them to groups
of elements that you have classified. Basically, the class attribute lets you define your
own tags and then apply them anywhere you want.
The DIV block division in combination with the CLASS attribute, effectively allows you
to create entirely new HTML elements that are specific to your area.
The SPAN element lets you specify inline elements within a document that have their own name and style
properties. Place inline elements within a line of text, like the "B" or "I" elements. Use the SPAN
element with the class attribute to create customised inline elements and apply styles more accurately.
BLOCKQUOTE in this example, sets a font of 14pt sans serif. Multple property statements must be seperated by
semi-colons. i.e FONT-FAMILY: sans serif; FONT-SIZE: 14pt
Font weight set by FONT-WEIGHT: NORMAL
(Or Bold, Bolder, Lighter)
A paragraph can have a border using "P" MARGIN: 30px; BORDER: DASHED 2pt RED; PADDING-LEFT: 10pt etc
To indent the first line of any paragraph use P TEXT-INDENT: -12pt etc. This ensures that the paragraph then reads look
standard text as found in a reading book.
NOTE: View page html to see coding!