Monday, January 6, 2025
HomeTechHTML align Attribute

HTML align Attribute

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.
See also  What is the Wayback Machine, and how does it work?

Deprecated

The align attribute is now deprecated in HTML5. Use CSS instead for alignment, e.g.:

html
<img src="image.jpg" style="float: left;">

For modern web development, rely on CSS properties like float, text-align, or vertical-align.

RELATED ARTICLES
0 0 votes
Article Rating

Leave a Reply

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
- Advertisment -

Most Popular

Recent Comments

0
Would love your thoughts, please comment.x
()
x