Choose a link to get started:



ALL NEW!!!

Scrolling Marquees


The Basics

The Basics
Manipulating Text
Images
Backgrounds
Links


More Advanced Topics

The <HEAD> Tag
Tables
Forms
Frames
Lists


Advanced Topics

Image Maps
CSS - Part 1
CSS - Part 2
CSS - Part 3
CSS - Part 4


Additional Topics

XML Tag Formatting
XHTML - Part 1
XHTML - Part 2

CSS Basics - Part 2

        In our last CSS tutorial, we discussed using the STYLE attribute of any tag. Any tag can have a STYLE attribute. Now we will discuss how to do the same thing, only in the <HEAD> section, and affecting the entirety of the page, not just one section. Let's take the heading, CSS Basics - Part 2. That is just like what we discussed in the previous tutorial. This time, however, I did not use the STYLE attribute. I used a stylesheet. This is the script placed inside of the <HEAD> section of this page :

<STYLE TYPE="text/css">
H1 {color: blue; text-decoration: underline}
</STYLE>


        The <STYLE> and </STYLE> tags were explained in the last tutorial. Let me go through the actual stylesheet script now.

  • The H1 is known as a selector. It selects what tag will be modified. Any tag in HTML can be a selector.
  • All modifications made to the selector are made in the { and }.
  • The "color: blue" changes the color of H1 to blue, and "text-decoration: underline" underlines the H1.


        Notice that the script used in the <STYLE> tag are the same used as the value of the STYLE attribute. It is that simple to transfer. However, now the script is enclosed by braces, {}, instead of quotes. Easy! Right?



text-decoration



         Now we get to the "text-decoration" modifier. The are 5 possible values for this modifier. They are :

VALUEEFFECT
noneno decoration
underline
Underlined Text

overline
Line above text
line-through
Text with line through
blink
Blinking
(Netscape Only)


        I chose to describe this modifier first because we were already talking about the underline value. It seemed natural to go here next.

        As with the end of every CSS tutorial, here is a list of what we have learned thus far interms of modifiers and values :

  • color
    • any color
  • text-decoration
    • none
    • underline
    • overline
    • line-through
    • blink


        My next CSS tutorial will be about ID's and CLASS's. Good Luck with CSS!