Easy Tutorial
❮ Att Keygen Keytype Att Area Download ❯

HTML <img> align Attribute

HTML <img> Tag

Example

Set the alignment of an image within the text:


Browser Support

All major browsers support the align attribute.


Definition and Usage

In HTML 4.01, the align attribute of <img> is deprecated.

The align attribute specifies the alignment of an image relative to the surrounding elements.

The <img> element is an inline element (it does not insert a new line on the page), which means text and other elements can wrap around it. Therefore, the align attribute helps us to specify the alignment of the image relative to the surrounding elements.


Compatibility Notes

In HTML 4.01, the align attribute of <img> is deprecated. Use CSS instead.

CSS Syntax: <img style="float:right">

CSS Example: Float Image to the Right

In our CSS tutorial, you can find more details about the float property.


Syntax

Attribute Values

Value Description
left Aligns the image to the left.
right Aligns the image to the right.
middle Aligns the image to the center.
top Aligns the image to the top.
bottom Aligns the image to the bottom.
❮ Att Keygen Keytype Att Area Download ❯