CSS Usage


Various methods exist for using style sheets within a document. Depending on the browser and/or server your results may very. The method of inlining is good for doing a quick check to see how something works. I would suggest that you use either the importing or linking method if you have more that a few pages to maintain.

Inlining Style

<P STYLE="color: red">all this text would be red.</P>

Embedding a Style Sheet

<HEAD>
<TITLE>Document Title</TITLE>
<STYLE TYPE="text/css">
H1 { font-size: large; color: blue }
BODY { background-color: white }
</STYLE>
</HEAD>

Importing a Style Sheet

<HEAD>
<TITLE>Document Title</TITLE>
<STYLE TYPE="text/css">
<!--
@import url(general.css);
@import url(http://www.fortnet.org/style/general.css);
-->
</STYLE>
</HEAD>

Linking a Style Sheet

<HEAD>
<TITLE>Document Title</TITLE>
<LINK REL=stylesheet TYPE="text/css" HREF="general.css">
<LINK REL=stylesheet TYPE="text/css" HREF="http://www.fortnet.org/style/general.css">
</HEAD>