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 3

        Yes, we have just a plain old heading because we are not talking about the <H1> tag, or any other HTML tag in this tutorial except <STYLE> and <DIV>. Let's get down to buisiness. We are here to discuss the creation of ID's and CLASS's. The following script shows you exactly how you need to do this :

<STYLE TYPE="text/css">
.first {text-decoration: line-through; color: red}
#second {color: green; text-decoration: overline}
</STYLE>


        Everything up there should be self-explanitory, except for two things. What are the .first and #second for? They, in respective order, identify CLASS's and ID's. A CLASS or ID can be named anything you want it to be named, except a CLASS has to have a "." in front of it and an ID has to have a "#" in front of it. Now, I bet you are asking how to call upon these ID's and CLASS's. This is where the <DIV> tag comes in. It has all the attributes of the <P> tag, except it does not skip two lines. Let's look.

<DIV CLASS="first">, </DIV>
<DIV ID="second">, </DIV>


        Notice that the # and . have disappeared from the ID and CLASS. The only time those are needed is when you are defining the CLASS's and ID's. Using these is simple. Oh, and by the way, here is what we got for using those :

Our FIRST CSS, a CLASS
<DIV CLASS="first">Our FIRST CSS, a CLASS</DIV>
Our SECOND CSS, an ID
<DIV ID="second">Our SECOND CSS, an ID</DIV>




font-style and font-weight



         Now we get to some more decoration of text. This encompasses to modifiers, font-style and font-weight. First, we will discuss font-style. Font-style describes how italicized text is. The are three possible values for this modifier. They are :

VALUEEFFECT
normalNo Change
italicItalics
oblique
Oblique


Font-weight describes how bold the text is. There are 5 possible values to this. The last value must be in intervals of 100.

VALUEEFFECT
normalNo Change
boldBold
bolder
Bolder
lighter
Lighter
Numeric Values from 100
to 900 in increments
of 100

400 is normal
700 is bold


        Now we have discussed CLASS's and ID's. The next tutorial is not a tutorial, but rather a list of modifiers and values. Here is what we learned so far :

  • color
    • any color
  • font-weight
    • normal
    • bold
    • bolder
    • lighter
    • 100 - 900
  • font-style
    • normal
    • italic
    • oblique
  • text-decoration
    • none
    • underline
    • overline
    • line-through
    • blink


Good Luck!!!