HTML img align Attribute

Definition and Usage

The align attribute specifies the horizontal and vertical alignment of the image in relation to the surrounding text/elements.
The image element is a floating element (does not start a new line in the HTML page), so text and other elements can wrap around it.

Compatibility Notes

The align attribute of the img element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.
Use CSS instead.
CSS syntax: <img style="float:left" />


<img align="alignment" />

Syntax Example

<img align="left" />

Attribute Values

Value Description
left Align the image left of the surrounding text.
right Align the image right of the surrounding text.
top Align the image on the top of the surrounding text.
bottom Align the image on the bottom of the surrounding text.
HTML img align Attribute Reviewed by 1000sourcecodes on 04:28 Rating: 5
Powered by Blogger.