Alignment Attributes

The following elements have had the attribute ALIGN added to them in HTML 3.2:

<H>, <P>, <IMG>

The ALIGN attribute for headings and paragraphs may have the value LEFT, CENTER, or RIGHT which aligns the contents in the document window accordingly.

IMAGES may have: LEFT, RIGHT, TOP, MIDDLE and BOTTOM values. These values have the following effects:

ecstatic.gif This image has no ALIGN attribute specified in it's tag. The text starts aligned with the bottom of the image and goes from there.


frantic.gif This image has the ALIGN attribute set to "LEFT". You can see the difference in how the text is displayed with respect to the image. All the writing continues down the page just the same as articles in a magazine or newspaper, wrapping around pictures to make them an integrated unit. As the text continues, it wraps around underneath the image and continues on. XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX XXXXX




This image is ALIGNed right. It will affect the text in the same manner as the preceding image, except on the opposite side of the document window.


tortoise.gif This is what happens to text entered beside an image when the image's ALIGN attribute is set to TOP.


owl.gif This is how the text and image are displayed together when the image ALIGN attribute has the value MIDDLE.


surprised.gif This is how the text and image interact with the image ALIGN attribute value set to BOTTOM. Basically the same as with no ALIGN specified at all, though there are some specialized uses of this value.


Home Page | Session 4 Index | List Types | Character Formatting