asp.net.ph

Skip Navigation Links

ALIGN Attribute | align Property

Language References


Specifies alignment of an image relative to adjacent content.

Applies To: IMG

Syntax


Inline <element align = absbottom | absmiddle | baseline | bottom | left | middle | right | texttop | top>
Script object.align = absbottom | absmiddle | baseline | bottom | left | middle | right | texttop | top

Possible Values


absbottom Aligns the bottom of the object with the absolute bottom of the surrounding text. The absolute bottom is equal to the baseline of the text minus the height of the largest descender in the text.
absmiddle Aligns the middle of the object with the middle of the surrounding text. The absolute middle is the midpoint between the absolute bottom and text top of the surrounding text.
baseline Aligns the bottom of the object with the baseline of the surrounding text.
bottom Aligns the bottom of the object with the bottom of the surrounding text. The bottom is equal to the baseline minus the standard height of a descender in the text.
left Aligns the object to the left of the surrounding text. All preceding and subsequent text flows to the right of the object. This is the default value.
middle Aligns the middle of the object with the surrounding text.
right Aligns the object to the right of the surrounding text. All subsequent text flows to the left of the object.
texttop Aligns the top of the object with the absolute top of the surrounding text. The absolute top is the baseline plus the height of the largest ascender in the text.
top Aligns the top of the object with the top of the text. The top of the text is the baseline plus the standard height of an ascender in the text.

align defaults to the bottom of the object aligned with the baseline of the surrounding text when no alignment is specified.

Remarks

This attribute has been deprecated in favor of CSS stylesheets.

Example

The following example shows the effects of applying the different possible values of the align attribute when used with the <img> element.

 Show me 

Applies To

IMG



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note