The Online Promoters
Home               Site Map               Links



HTML Tutorial


Chapter 3: More Common Tags

Paragraphs

You will often use paragraphs in HTML, just as you do when you write stories. The opening tag for a paragraph is <p> and the closing tag is </p>. The closing tag for a paragraph is not always needed but is recommended.

Example of a paragraph:

Bob starts to chase the chicken around. Bob trips over a string and goes flying into the pig's mud pit. What a mess!

(<p>Bob starts to chase the chicken around. Bob trips over a string and goes flying into the pig's mud pit. What a mess!</p>)





Text Formatting Properties

If you had an entire web page without formatted text, it would look rather dull and boring. This is why we use text formatting tags.

Some common text formatting tags are:

<b> and </b> for bold,
<i> and </i> for italics,
<u> and </u> for underlined, and
<tt> and </tt> for typewriter.





Text Formatting Properties: Font Tags

The <font size=n> and </font> tags come in handy.
n is the number of font points by which to change the size of the current font.
n can be positive or negative: a positive number will increase the font size, and a negative number will decrease it.
n can also be an absolute number, indicating an absolute size for the font (not a relative size).

Example of font tags:

Bob is a fun guy, isn't he?
(<font size=+1>Bob</font> <font size=+2>is</font> <font size=+3>a</font> <font size+2>fun</font> <font size=+1>guy,</font> <font size=-1>isn't he?</font>)





ALIGN Attributes

Many tags support ALIGN attributes if you want something to be aligned from the left margin, from the center, or from the right margin. The ALIGN attribute is placed in the opening tag before the >.

Left Align

(<h3 align=left>Left Align</h3>)

Center Align

(<h3 align=center>Center Align</h3>)

Right Align

(<h3 align=right>Right Align</h3>)





The Line Break

When your HTML document is viewed, normally the text will do a word-wrap at the end of a line. If you want to have the text BREAK (go to another line) you will use the <br> tag. This tag has no closing tag.

Example WITHOUT line Break:

Sentence One. Sentence Two. Sentence Three.
(Sentence One. Sentence Two. Sentence Three.)


Example WITH line Break:

Sentence One.
Sentence Two.
Sentence Three.
(Sentence One.<br>)
(Sentence Two.<br>)
(Sentence Three.<br>)





Your Own HTML Page

Add the following to your HTML page ("home.html"), between the lines <body> and </body>:

<h1>YOURNAME's Home Page</h1>
<hr>
This is the home page of <b>YOURNAME</b>.
<p>Type something about yourself here. Describe briefly who you are and what you do for a living. Remember to use bold and italic text, for emphasis.</p>

Save the text file as "home.html".










Copyright © 2007 TheOnlinePromoters.com