Image align property
Image Object
Definition and Usage
The align property sets or returns the value of the align attribute of an image.
The align attribute specifies the alignment with inline content.
Syntax
imageObject.align=
value
The align property can have the following values:
| Value | Description |
|---|---|
| left | Image left aligned |
| right | Image right aligned |
| middle | Image center aligned |
| top | Image top aligned |
| bottom | Image bottom aligned |
Browser support





All major browsers support the align property
Example
Example
The following example right-aligns the image according to the surrounding text:
Some text. Some text. Some text. Some text. Some text.
Try it »
Image Object