CSS in a Nutshell
Regardless of the type of file, the syntax convention is always the same. Attribute : Argument ; (attribte [full colon] argument [semicolon]).
A Comment Field in CSS is C++ style.
// comment to end of line only or
/* comment multiple
lines until stopped */
An External CSS file is really the best way to go. You can link as many pages to it as you have, and one change to the CSS file makes the same change to ALL pages calling that file.
An External CSS file is called using the following syntax:
<link rel="STYLESHEET" href="grimes.css" type="text/css">
* This should be placed in the HEAD of the HTML document.
An Embedded Style sheet is also embedded in the of the document, but contains all the style information on the page in which it will be used. This can be a problem if you are attempting to make a uniform change across many documents. It may also be used in conjunction with the external CSS file for style commands specific to that page alone.
An Embedded CSS file uses the following syntax:
<STYLE TYPE="text/css">
<!--
BODY {
height: 8.5in;
background-image:url(image3.jpg);
background-repeat:repeat-y;
font-family: arial, helvetica, sans-serif;
color:#ffffff;
font-weight:bold;
background-color :#000000;
}
A:link {
font-family: arial;
color : #000000;
background-color : transparent;
text-decoration : none;
}
A:visited {
font-family: arial, sans-serif;
color : #000000;
background-color : transparent;
text-decoration : none;
}
A:hover {
color : #FFFFFF;
background-color : #000080;
text-decoration : none;
}
A:active{
color : #800000;
background-color : #FFFF00;
text-decoration : underline || overline;
}
-->
</STYLE>
Notice that the style sheet is enclosed in a to prevent older, non-CSS browsers from trying to read it.
I typicly use this style for development, then move the style information to an external .css file for publication.
Finally, Inline Style can be employed
Example:
<P STYLE="font-family: arial, helvetica, sans-serif; color:#ff0000; font-weight:bold;">
results in:
Hi There!!