English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML tag list

HTML object align attribute

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.

  HTML <object> tag

Online Example

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 ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the align attribute.

Definition and Usage

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.

Compatibility Notes

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.

Syntax

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

Attribute Value

ValueDescription
leftAlign objects to the left.
rightAlign objects to the right.
middleCenter align objects.
topAlign objects upward.
bottomAlign objects downward.
  HTML <object> tag