English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The align attribute specifies the alignment of the <object> element according to the surrounding elements, where the <object> element is an inline element (it does not insert a new line on the page), which means that text and other elements can wrap around it. Therefore, specifying the alignment of <object> based on surrounding elements may be very useful.
An aligned <object> on the left:
!DOCTYPE html> <html> <head> <title>HTML:<object> align attribute - 基础教程网(oldtoolbag.com)</title> </head> <body> <h4>Object with align="left":</h4> <p>This is some text. <object width="200" height="200" align="left" data="bookmark.swf"></object> This is some text.</p> <p>This is some text. This is some text.</p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the align attribute.
HTML5 The align attribute of <object> is not supported. 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 based on 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, specifying the alignment of <object> based on surrounding elements may be very useful.
In HTML 4.01 In the <object> tag, the align attribute is deprecated. Please use CSS instead.
CSS Syntax: <object style="float:right">
CSS Example: Float a <object> to the right
In our CSS tutorial, you will see more about float Attribute details.
<object align="left|right|middle|top|bottom">
Value | Description |
---|---|
left | Align objects to the left. |
right | Align objects to the right. |
middle | Center align objects. |
top | Align objects upward. |
bottom | Align objects downward. |