HTML object align property
Examples
A right-aligned <object>:
try it"
Browser Support
All major browsers support align attribute.
Definition and Usage
HTML5 does not support the <object> align attribute. Use CSS instead.
In HTML 4.01, <object> The align attribute is deprecated .
align attribute specifies the <object> element with respect to the alignment of the surrounding elements.
<Object> element is an inline element (it will not insert a new row in the page), which means text and other elements can wrap it. Therefore, it is useful when prescribed <object> with respect to the alignment of the surrounding elements.
Compatibility Notes
In HTML 4.01, <object> The align attribute is deprecated. Use CSS instead.
CSS Syntax: <object style = "float: right">
CSS Example: right-floating a <object>
In our CSS tutorial, you'll see more about the float property detail.
grammar
Property Value
值 | 描述 |
---|---|
left | 向左对齐对象。 |
right | 向右对齐对象。 |
middle | 居中对齐对象。 |
top | 向上对齐对象。 |
bottom | 向下对齐对象。 |
HTML <object> tag