Aligning Images

Perhaps the more expected use of the align attribute is for aligning images with text. You can align an image in various ways to a single line in a paragraph. However, be careful with multiple images on the same line—different align options have different effects depending on which image is taller and which appears first.

Figure 5.34. You can align an image with the top, middle, or bottom of the line in which it appears.

To align an image with text:

1.
Type <img src="image.location" where image.location indicates the location on the server of the image.
2.
Type align="direction" where direction is top, middle, or bottom

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.