How To Style Your Text With CSS  

Styling text with CSS is really simple. We can define colors, underline it, make it bold, define the font etc etc.

We will start with some basics.

First we define the html where we will be working with.

This is the text

1. Colorize your text

We can select the P tag and add some styles to it. p { color:red; }

Now our text will turn red. You can define any color code your want or choose one of the 16 standard color names. The color names are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white and yellow.

2. Define the size of your text p { font-size:12px; }

You can define any font-size you want, 145 pixels is not a problem. That is, technically speaking.

3. Make the text bold or Italic You can use the font-style property to create these effects.

Bold: p { font-weight:bold; }

Italic p { font-style:italic; }

4. Overline, Underline, strike-through and none

The text-decoration property is useful to create the underline and the other effects we need. p { text-decoration:underline; text-decoration:line-through; text-decoration:overline; text-decoration:none; }

On default, the text doesn't have any lines at all. Except for the link. You can remove the underline by using the text-decoration:none; setting.

You see, it's quite easy to style your text using CSS. And you can do it all in a separate stylesheet!

Recent article: CSS Articles
CSS Content? Using tables within the content of your page is a major no-no, the whole intent and purpose of CSS is to control the style of your page elements, this is done using an external stylesheet.

An external Stylesheet? External stylesheets give you the control of your whole website from one single file rather than trying to edit your whole websites CSS using global search and replace or by opening each page individually.

If you are new to this HTML malarkey then welcome, you have just embarked upon a new learning curve that does not take too long to master. Before the invention of CSS everything within a webpage used to be designed using tables.

Indeed there are still a lot of html editors out there that still use tables to format a pages content, one strong word of advice, get rid of that software and start again. Tables are not extinct within webpages but they should only be used for the purpose of presenting data.

Beginning CSS? I am not going to use this article to give you a whole list of tags and how to apply them, that information would be too easily ignored. There are thousands of well rounded websites available on the net today that can walk you through the first stages of CSS, the one I would recommend would be: W3Schools CSS intro this is a perfect place to start learning CSS, in the interests of parity and fairness I will also recommend What can be achieved using CSS .