The <img>
align
attribute was used in HTML4 to specify the alignment of an image relative to surrounding content. Its values included:
left
: Aligns the image to the left of the content.right
: Aligns the image to the right of the content.top
: Aligns the top of the image with the top of the text.middle
: Aligns the middle of the image with the text baseline.bottom
: Aligns the bottom of the image with the text.
Deprecated
The align
attribute is now deprecated in HTML5. Use CSS instead for alignment, e.g.:
For modern web development, rely on CSS properties like float
, text-align
, or vertical-align
.