HTML The align attribute
Example
An HTML form with an image submit button, aligned to the right:
Try it »
Browser support





**Note:** Only the "left" and "right" values of the align attribute work in all major browsers.
Definition and Usage
HTML5 does not support the align attribute. Please use CSS instead.
In HTML 4.01, The align attribute is deprecated.
The align attribute can only be used with the element; it specifies the alignment of the image input relative to other surrounding elements.
Compatibility notes
In HTML 4.01, The align attribute is deprecated. Please use CSS instead.
CSS syntax:
CSS example: aligning an input image
In our CSS tutorial, you can find more details about The float attributedetails.
Syntax
Attribute values
| Value | Description |
|---|---|
| left | Align the image to the left (default). |
| right | Align the object to the right. |
| top | Align the image to the top. |
| middle | Align the image to the center. |
| bottom | Align the image to the bottom. |
HTML tag