Definition and Usage The align attribute specifies the horizontal and vertical alignment of the image in relation to the surrounding text/e...
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" />
Syntax
<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. |