Cascading Stype Sheet Form
CSS FORM [Placed between <head></head> comments are used
to block information for browsers that don't read style sheets. ]
<STYLE TYPE="text/css">
<!--
rule1;
rule2;
rule3;
.....
-->
</style>
| RULE | ||||
| Selector(s) | { | Declaration(s) | } | |
| { | Property: | Value | ;} | |
| H1, H2 | { | color: | green | ; |
| background: | red | ; } | ||
|
Selectors can be grouped, |
||||
This example
sets up the html href links:
<STYLE TYPE="text/css">
<!--
A:link {color:#000000; text-decoration:none}
A:visited {color:#000000; text-decoration:none}
A:hover {color:#000000; text-decoration:underline}
A:active {color:#000000; text-decoration:none}
-->
</style>
Note: Active must be after hover to work.
Could also be:
<STYLE TYPE="text/css">
<!--
A:link, A:visited {color:#000000; text-decoration:none}
A:hover {color:#000000; text-decoration:underline}
A:active {color:#000000; text-decoration:none}
-->
</style>
Note: Can't include A:active on first line since it has to be after hover
to work.
HTML Link to css file: [where REL means
relative, HREF means external html reference (could be HREF=/sheet1.css
as well), TITLE is not normally used.]
<LINK REL="stylesheet" TYPE="text/css" HREF="sheet1.css"
TITLE="Default">