This paragraph has a style specifing red, 18 pt text that should be displayed in Arial; if Arial is not available, then in Verdana; if not Verdana, then Times; if not times, then the default serif.
what is the difference between serif and sans-serif?
Embedding a style sheet will apply the style to the whole document, instead of just one tag.
Style information (instructions/definitions ) is placed at the top of the document, within the head tags.
<STYLE TYPE="text/css"> <!-- H1 { font-family: 'Arial, Verdana, Times,', serif; font-size: 18pt; } P { font-family: 'Palatino', sans-serif; font-size: 12pt; } A:link {color:#0000cc; font-weight:bold;} A:active {color:#0000ff; font-weight:bold;} A:visited {color:#333333; font-weight:bold;} --> </STYLE>Linking to an external style sheet is the most efficient overall way to add style to your document. By linking, you can use the same style sheet with hundreds of pages. For example, if you have a site with 300 pages, and want to change the way they all look, with a linked style sheetyou would only need to change the .css file, instead of going through and changing each web page individually.
To link to external sylesheet, you use the link tag with in the head of the document:
<LINK REL= "stylesheet" HREF="style.css" TYPE="text/css" TITLE="externally linked style sheet">
It is extremely important to have the type attribute within the link tag. Without specifying the type as text/css, some browsers (notably netscape 4.x) will not know how to interpret the information and will simply display your css code.
Here is an example of an external style sheet (After defining the style in your external style sheet, save it as text only, with an extension of .css)<!--authored and designed by J. Baxter, 1998--><!--H1 { font-family:"Arial, Palatino, Verdana, serif";font-size:18pt; text-align: center;color: #000;}H2 { font-family:"Arial, Palatino, Verdana, serif";font-size:16pt; text-align: center;color: #000;}A:link { color: #000066 }A:visited { color: #000066 }A:active { color: #900 }.hide { display: none; color: white;}//-->Surround your style definitions with comment tags to hide them from older browsers