LESSON 3: "Prettier" text

This lesson will teach you how to make your pages look better, like centering, bolding, and others common with word processors.

Centering

Centering is a very important part of making your pages look better. It helps make it more readable, and grabs the attention. If you are making titles or headings, you will often want to center them.

Centering is very simple. Just insert <CENTER> in front of the text you want to center, and </CENTER> when you are done centering and want to return to your previous alignment.

Example:
<CENTER>Centering is easy!</CENTER>

Any text after that line will not be centered anymore. If you have text on the same line as the </CENTER> command, but immediately after, it will be placed on the next line in your browser.

Example 2:

<HTML>
<HEAD>
  <TITLE>A simple Centering example</TITLE>
</HEAD>

<BODY BGCOLOR="White" TEXT="Navy">

<CENTER>Centering is easy!</CENTER> You have just learned
how to center! It definitely makes it look better.

</BODY>
</HTML>

Click here to see the effect of the above file!

There is still a lot more to be desired than simply centering things. Note that you should try to use good structure in your coding. You usually would NOT put any text on the same line as the </CENTER> because it's confusing and harder to read. I used it to illustrate the effect that it will be put on the next line.


Bolding and Italicizing

These are basically used the same way as centering. To start bolding, you would put <B> in front of the text you want to bold, and end it with </B>. For italicizing, insert <I> to start and end it with </I>

Example:

<HTML>
<HEAD>
  <TITLE>A Bolding and Italicizing Example</TITLE>
</HEAD>

<BODY BGCOLOR="White" TEXT="Black">

<CENTER>
<B>Bolding text helps it stand out</B>
</CENTER>

<P>
With a combination of centering, <B>bolding</B>, and <I>italicizing</I>,
you can make your pages neater and catch the reader's attention.

</BODY>
</HTML>

Click here to see the effect of the above file!


Underlining

Underlining couldn't be any simpler. It's just like the others. Insert <U> where you want to start underlining, and finish it with </U>.

Example:
<U>Underlining is easy!</Underlining>

which would look like this:
Underlining is easy!


Strike-out

Strike-out text is text that has a line through it, like this!. It is useful for adding links on your page that aren't up yet, but you want people to know that it will be someday. It could also be used in anti- slogans or whatever.

The way you use the strike-out is basically the same as everything else you have learned. To begin, put <STRIKE> in front of where you want to start, and </STRIKE> to end.

Example:
<STRIKE>Striking is easy!</STRIKE>

which would look like this:
Striking is easy!


Forward to Lesson 4: Font Size and Color
Back to Lesson 2: Dissecting a simple HTML file
Back to the Contents

E-mail me.