HTML input align Attribute
HTML <input> tag
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" />
In our CSS tutorial you can find more details about the
float property.
Syntax
<input align="alignment" />
|
Syntax Example
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>
|
Try-It-Yourself Demos
input align
attribute example
Specify the alignment of an input type="image".
In CSS:
align input image
Specify the alignment of an input type="image" with CSS.
HTML <input> tag
Whether you're new to XML or already an advanced user, the user-friendly views
and powerful entry helpers, wizards, and debuggers in XMLSpy are designed to
meet your XML and Web services development needs from start to finish.
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- Support for Office Open XML (OOXML)
- Graphical WSDL editor & SOAP debugger
- Java, C#, C++ code generation
- And much more!
Download a fully functional free 30-day trial today!
|