A CSS Primer #02
[Cascading Style Sheets]

SETTING UP THE STYLES

You could make these color changes by simply adding the <font color="blue"> tag to each of the headers. This works if you only have a few changes to make, but what if you have a dozen, or several dozen, of these headers on your page? Furthermore, what if you have several dozen pages to do as well?

Enter the beauty of CSS.

This is how we begin:

  1. We declare our styles within the document’s <head> tag with the <style> tag:

    <head><title>FAQ About Paragraphs</title>
    <style type="text/css">
    <!--
    tag { property: value }
    -->
    </style>

    </head>


  2. Replace tag with the name of the HTML tag (for this example: h4)

  3. Replace property with the proper parameter (for this example: color)

  4. Replace value with the value of the parameter (for this example: blue or #0000FF)

This is how our style declaration should look:

<head><title>FAQ About Paragraphs</title>
<style type="text/css">
<!--
h4 { color: blue }
-->
</style>

</head>

n e x t