Easy Tutorial
❮ Tag Code Att Td Valign ❯

HTML <object> align Attribute

HTML <object> Tag

Example

An <object> aligned to the right:


Browser Support

All major browsers support the align attribute.


Definition and Usage

In HTML 4.01, the align attribute of the <object> is deprecated.

The align attribute specifies the alignment of the <object> element relative to the surrounding elements.

The <object> element is an inline element (it does not insert a new line in the page), which means text and other elements can wrap around it. Therefore, it is useful for specifying the alignment of the <object> relative to the surrounding elements.


Compatibility Notes

In HTML 4.01, the align attribute of the <object> is deprecated. Use CSS instead.

CSS syntax: <object style="float:right">

CSS Example: Float an <object> to the right

In our CSS tutorial, you will find more details about the float property.


Syntax

Attribute Values

Value Description
left Aligns the object to the left.
right Aligns the object to the right.
middle Centers the object.
top Aligns the object to the top.
bottom Aligns the object to the bottom.
❮ Tag Code Att Td Valign ❯