Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Image align property

Image align property

Image Object Reference 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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the align property


Example

Example

The following example right-aligns the image according to the surrounding text:

Runoob Tutorial(runoob.com) Computerman

Some text. Some text. Some text. Some text. Some text.

Try it »


Image Object Reference Image Object