Definition and Usage The align attribute specifies the alignment of the image in relation to it's surrounding elements. This attribute...
Definition and Usage
The align attribute specifies the alignment of the image in relation to it's surrounding elements.This attribute is only used if the type attribute of the input element is set to "image".
Compatibility Notes
The align attribute of the input element was deprecated in HTML 4.01 and is not supported in XHTML 1.0 Strict DTD.Use CSS instead.
CSS syntax: <input style="float:left" />
Syntax
<input align="alignment" /> |
Syntax Example
<input align="left" /> |
Attribute Values
Value | Description |
---|---|
left | Align the image to the left. |
right | Align the image to the right. |
top | Top align the image. |
texttop | Align the image to the top of the tallest text. |
middle | Middle align the image. |
absmiddle | Align the image to the absolute middle. |
baseline | Align the image to the bottom of the lowest text. |
bottom | Bottom align the image. |
absbottom | Align the image to the absolute bottom. |
Browser Support
The "left" and "right" values seems to work in all browsers. The rest of the attribute values are poorly supported.Example
<form action=""> <input type="image" src="input_image.gif" align="left" /> </form> |