HTML <object> alignAttribute
Examples
A right-aligned <object>:
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the align attribute.
Definition and Usage
HTML5 does not support the <object> align attribute. Please use CSS instead.
In HTML 4.01, the align attribute of <object>is deprecated。
The align attribute specifies the alignment of the <object> element relative to surrounding elements.
The <object> element is an inline element (it does not insert a new line on the page), which means text and other elements can wrap around it. Therefore, it is useful when specifying the alignment of <object> relative to surrounding elements.
Compatibility Notes
In HTML 4.01, the align attribute of <object> is deprecated. Please use CSS instead.
CSS syntax: <object style="float:right">
CSS Example: Float an <object> to the right
In our CSS tutorial, you will see more aboutthe float propertydetails.
Syntax
Attribute Values
| Value | Description |
|---|---|
| left | Aligns the object to the left. |
| right | Aligns the object to the right. |
| middle | Aligns the object to the center. |
| top | Aligns the object to the top. |
| bottom | Aligns the object to the bottom. |
HTML <object> Tag Other Extensions