Please visit our sponsors.

Text Formatting

You may change the way a text is displayed with these tags, but it's always important to remember that everything doesn't look exactly the same in all different browsers. A user may change the default font size and then his page will look totally different. Don't make your page only look good in your browser.

Standard Text

If you just want plain text which you don't want change in any way, you don't need a tag at all. The only thing you need to think of is where you put your line breaks and paragraphs. Web browsers will automatically wrap the text if the line is wider than the window, but text without any line breaks or paragraphs at all will be quite hard to read.

Paragraphs

To make your text a little bit more readable you can divide it in paragraphs.

<P>   </P>

Line Breaks

Inserting a line break is done with the <BR> tag, it will make your text wrap no matter where it is on the page.

Headers

Headers are made with the <H1> tag. You may change the heading size with the number inside the tag.

<H1>   </H1>

Here is an example of the different sizes.

H1

H2

H3

H4

H5
H6

Style and Size

Bold

This will make the text <B>bold</B>.
This will make the text bold.

Italic

And this will make it <I>italic</I>.
And this will make it italic.

Blinking

You may also make your text blink, but consider using bold or italic instead because most people really hate blinking text. It's done with this tag:

<BLINK>   </BLINK>

Preformatted

If you want a part of a text not to be formatted by the browser you should use the <PRE> tag. Text between the these tags will be displayed exactly as you typed it, with multiple spaces and linebreaks. It can be very useful for displaying source codes, for example.

<PRE>   </PRE>

Font Size & Face

You may also change the size of the font. Use the following tag to do this. You may enter a number between 1 and 7 (default is 3).

<FONT SIZE="5">   </FONT>

It's possible to change the font itself, but then the user must have the font on his own computer. I don't think it's a majority of users who have more than the usual fonts available when they browse, so check that you page looks good with the default font too. You may specify more than one font, if the first isn't found the browser will try to use the next, if all fonts fail it will use the default.

<FONT FACE="Arial">   </FONT>
<FONT FACE="Arial, Helvetica">   </FONT>

You may set the font face and size at the same time.

<FONT SIZE="2" FACE="Arial">   </FONT>

Indentation

You may indent text like I have done on most of my pages. The text itself is a little bit more to the right than the header. All text between the <BLOCKQUOTE> tags will be indented.

<BLOCKQUOTE>   </BLOCKQUOTE>

Horizontal Rule

Sometimes it may be a good idea to separate text with a rule. The easiest way to do this is with the <HR> tag. The tag works all alone, simply putting <HR> in your HTML code will display a thin horizontal line. You may change the way it looks with these attributes.

<HR SIZE=10> - Thickness it is in pixels (default 2).
<HR WIDTH=10> - Width in pixels.
<HR WIDTH=50%> - Width in percent.
<HR ALIGN=CENTER> - Position (also try LEFT or RIGHT).
<HR WIDTH=50% ALIGN=CENTER> - You may also combine the tags.

Previous Home Next


Last updated 970621