Web Design Programming Half-Life Counter-Strike Rainbow 6 E-Mail TunkeyMicket

CSS Tutorial [page 5]


   The first thing that CSS is generally used for is text manipulation. Common changes include font color, font size, font face, and font properties. Below are the common font properties:

color
This property defines the forground color of an element. In all cases this is the font color.
font-size
This property speaks for itself, it defines how large [or small] that the font in the element should be.
font-family
This property determines which font will be used in the element, when declaring a font-family more than one font may be given. This is done so that if one font is not found, default to another.
font-style
This property determines the rendering of the font, i.e. normal, italic, oblique, etc.
font-weight
This property determines how bold or light a font will render.
font
This is the all-inclusive property that allows you to set all the properties of fonts in just one property. However, it is much easier to read the font properties separately, than all together.

   Those are not the only properties for fonts, but rather the most commonly used ones. Below I have listed many text properties that deal with the positioning and other effects particular to a block of text:

text-align
This sets the horozontal alignment of the text within an element.
vertical-align
This sets the vertical alignment of the text within an element.
text-decoration
This property should really fall under font properties but it is defined as a text modifier, which is not necessarily the same as a font modifier. The settings determine the rendering of the text, i.e. underline, strikethrough, [the dreaded] blink, etc.

<HTML>
<HEAD>
<TITLE>CSS Class Tutorial</TITLE>
<STYLE>
     FONT#bluefont { color: blue; font: bold italic; }
     B.greenfont { color: green; font: bold; }
     #grayfont { color: gray; font: italic; }
     .navyfont { color: navy; font: bold; }
</STYLE>
</HEAD>
<BODY>
<TT ID="grayfont">This is gray and italic!</TT>
<B CLASS="greenfont">This is green and bold!</B>
<FONT ID="bluefont">This is blue, bold, and italic!</FONT>
<I CLASS="redfont">This is navy and bold!</I>
</BODY>
</HTML>

   Well, that is about all I can say for multiple statements. However, I know that telling you all this is worth absolutely jack, UNLESS you know what properties you can use in a CSS declaration. Guess what is next...

3 4