This lesson will teach you how to make your pages look better, like centering, bolding, and others common with word processors.
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.
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!
Example:
<U>Underlining is easy!</Underlining>
which would look like this:
Underlining is easy!
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!