Latest web development tutorials

HTML object align property

HTML object tag Reference Manual HTML <object> tag

Examples

A right-aligned <object>:

<object width="200" height="200" data="helloworld.swf" align="right"></object>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

<object align="left|right|middle|top|bottom">

Property Value

描述
left 向左对齐对象。
right 向右对齐对象。
middle 居中对齐对象。
top 向上对齐对象。
bottom 向下对齐对象。


HTML object tag Reference Manual HTML <object> tag