Cascading Style Sheets (css) provide a way to specify the style of your page elements (e.g spacing, margins, fonts, etc) separately from the content of your document. This separation of style from content provides a way to create consistency of style across your entire web site and makes it easy to manage changes.
Useful Links:
<HTML> <HEAD> <TITLE>title</TITLE> <LINK REL=STYLESHEET TYPE="text/css" HREF="myStyles.css"> <STYLE TYPE="text/css"> H1 { color: blue } </STYLE> </HEAD> <BODY> <H1>Headline is blue</H1> <P STYLE="color: green">While the paragraph is green. </BODY> </HTML>
When more than one way of including styles is used then:
Internal styles are specified in the head section using the style tag as shown in the example above.
If more than one tag shares the same property value, then the tags can be grouped. Note, this does not mean the tags are identical. They still have the default values for all of the properties not specified in the style.
<STYLE TYPE="text/css"> H1, H2, H3 { font-family: helvetica } </STYLE>
Similarly, property declarations can be grouped:
<STYLE TYPE="text/css"> H1 { font-weight: bold; font-size: 12pt; line-height: 14pt; font-family: helvetica; font-variant: normal; font-style: normal; } </STYLE>
Note the general syntax above:
tag-name, tag-name, ... { property : value; property : value;...}