Paragraph Alignment

Default to the left

Center Anything

... or push all the way right

If you talk to a mark-up language purist, alignment is an attribute. The more general HTML (and "standard") for center alignment is a variation on the <p> tag. The markup for the centered text and images above could look something like this:

<p align=center>
<img src="pictures/ethernet.gif" align="middle">
Center Anything
<img src="pictures/ethernet.gif" align="bottom">
</p>

Note that now there is a closing </p> tag. This becomes important later when we get into Style Sheets and other design features. Also, if you are center aligning several paragraphs, each one will have to be marked with a separate <p align=center>...</p>

To right align text and images, as in the example above, use the "align=right" attribute:

<p align=center>
... or push all the way to the right
<img src="pictures/ethernet.gif" align="bottom">
</p>

Finally, if you want to justify text (common in essay-type projects) use the align="justify" attribute:

<p align=justify>
The hugely popular SpreadFirefox project, a Firefox community marketing site, has recently fallen victim to a security breach in their TWiki software. This breach has forced the site to shutdown until October 19th. During this time, they will be performing a rebuild of the SpreadFirefox system, to hopefully curb more security breaches.
</p>

Change the size of this browser window to see how the justified text (directly above) changes differently than the default left-aligned text.

By the way, any header <hN>...</hN> tag may be aligned by adding the align="" attribute. The markup for the centered heading above could look something like this:

<h1 align=center>Or.... Headers</h1>