How do I align an image to the right (or left) using HTML?

2008-04-30


You can use <img align="right"> to float a image to the right. (Use align="left" to float it to the left.) Any content that follows the <img> tag will flow around the image. Use** <br clear="right"> or <br clear="all">** to mark the end of the text that is to flow around the image, as shown in this example:

The image in this example will float to the right.

<img align="right" src=... alt=...>

This text will wrap to fill the available space to the left of (and if the text is long enough, below) the image. ** <br clear="right">**

This text will appear below the image, even if there is additional room to its left.

The **CSS float **property can also be used:

_**.photo-float-left { float:left; margin-right:10px; }

.photo-float-right { float:right; margin-left:5px; }**_