Name
ALIGN — NN all IE all HTML all
Synopsis
ALIGN=”where"Optional
Determines how the IMG element is rendered in
physical relation to the element’s next outermost container and
surrounding content. Some settings also let you “float”
the image to the left or right margin and let surrounding text wrap
around the image (but no wrapping with a centered image).
Most of the rules for alignment constant values cited at the
beginning of this chapter apply to the IMG
element. Typically, ALIGN attributes are
deprecated in HTML 4.0 in favor of the style sheet attributes. But if
you require backward compatibility for your document, stick with the
ALIGN attribute.
Example
<IMG SRC="surferDude.gif" ALIGN="right" HEIGHT=100 WIDTH=200>
Value
Each browser defines a different set of values for this attribute.
Although the ALIGN attribute has a long heritage,
not all values do. The more esoteric values, such as
absmiddle and baseline, were
added to browser offerings in Navigator 3 and Internet Explorer 4.
Select the value(s) from the following table that work for your
deployment:
|
Value |
NN 4 |
IE 4 |
HTML 4.0 |
|---|---|---|---|
absbottom |
• |
• |
- |
absmiddle |
• |
• |
- |
baseline |
• |
• |
- |
bottom |
• |
• |
• |
left |
• |
• |
• |
middle |
• |
• |
• |
right |
• |
• |
• |
texttop |
• |
• |
- |
top |
• |
• |
• |
Default
bottom
Object Model Reference
- IE
[window.]document.imageName.align
[window.]document.images[i].align
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access