HTML <img> with align Attribute

HTML <img> with align Attribute

The align attribute specifies the alignment of the image.

Warning: The align attribute is deprecated and is no longer recommended.

Tips: To align the image, try any of the following methods:

  • Using style global attribute: <img style="vertical-align: bottom">.
  • Using CSS vertical-align property.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>This is img align<img src="/books.png" align="top" width="45" height="45"> top.</p> </body> </html>

Attribute Values

NameExplanation
topImage aligned with the top of the tallest element on the line.
middleImage aligned in the middle of the line.
bottomImage aligned at the bottom of the line.
leftImage will float at the left side of the element.
rightImage will float at the right side of the element.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Meet the Author