Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

Table of Contents Home Page Web Taming's Free 'Net ToolsSite Search Table of Contents

Learning HTML 3.2: Block Formatting  [Prev]  [Next]



Block Formatting elements are the most common element in an HTML document.  We'll look at some paragraph formatting first.

Paragraph

We've already demonstrated <P> in our Basic Template.  A normal paragraph has a single blank line after it, will ignore line breaks in the text, and condense multiple spaces in the text into a single space.  The closing </P> tag isn't necessary, whenever the browser runs into a new block formatting tag, it will understand that the previous paragraph has ended.  You can add the ALIGN attribute to the tag to center it, <P ALIGN=center>, or right-align it, <P ALIGN=right>.

This should be centered.

This paragraph may be right-aligned
(doesn't work in all browsers).

To go back to left-aligned use <P ALIGN=left>.

Address Information

The Address tag is used to enclose contact information, addresses and the like.  It is often rendered with a slightly indented left margin and italics.  Use the <BR> (line break) tag for explicit line breaks after each line.

<ADDRESS>Peter Conrad Cumminsky<BR>
Middletown, CA 95461</ADDRESS>

Peter Conrad Cumminsky
Middletown, CA 95461

Large Quotations

<BLOCKQUOTE>Used when more than a few lines from a document are being quoted. Block quotations are often rendered indented.</BLOCKQUOTE>

Preformatted Text

<PRE WIDTH=40>
....|....1....|....2....|....3....|....4
Used to include sections of text in 
which formatting is critical.  Text will
only be wrapped at the line-breaks in 
the source, and spaces will not be col-
lapsed.  Text inside this tag will be 
displayed in a monospaced font.  The 
WIDTH attribute can be used to indicate 
how wide the text is.  This isn't 
widely supported.

</PRE>

Headings

The heading tag displays text in larger or bolder fonts than normal text.  It is used like the levels in an outline.  There are six levels of headings, numbered 1 to 6 with 1 being the largest and 6 being the smallest.  Search engines may give words appearing in headers more importance in their index.  The ALIGN attribute controls the horizontal alignment of the heading in the same way as in the paragraph tag.

<H1>Heading 1</H1>

<H2>Heading 2</H2>

<H3>Heading 3</H3>

<H4>Heading 4</H4>

<H5>Heading 5</H5>
<H6>Heading 6</H6>

Logical Division

Used to mark up divisions in a document, <DIV> ... </DIV>, can enclose other block elements.  The ALIGN attribute controls the horizontal alignment of the division in the same way as in the paragraph and headings tag.  Instead of <DIV ALIGN=center>, use <CENTER> (below).

<CENTER>is used to indicate that large blocks of text should appear centered.</CENTER>

Jump to top[Top]
• Back • Home • Up • Next •

Send feedback and kudos to: peterconrad@hotmail.com
Copyright © 1996-2004 by Web Taming All Rights Reserved.

For more attractions please visit my Personal Pages on Planet Tripod.