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

HTML Reference Manual

HTML Tag Directory

HTML object align attribute

The align attribute specifies the alignment of the <object> element based on the surrounding elements, 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> etichetta

Online Example

A left-aligned <object>:

<!DOCTYPE html>
<html>
<head>
<title>HTML:<object> align attribute - Basic Tutorial Website (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 see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the align attribute.

Definition and Usage

HTML5 does not support the <object> align attribute. Please use CSS instead.

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

L'attributo align specifica lo stile di allineamento dell'elemento <object> in base agli elementi circostanti.

L'elemento <object> è un elemento inline (non inserisce una nuova riga nella pagina), il che significa che il testo e gli altri elementi possono circondarlo. Pertanto, specificare lo stile di allineamento di <object> in base agli elementi circostanti può essere utile.

Commenti di compatibilità

In HTML 4.01, l'attributo align dell'<object> è obsoleto. Utilizzare CSS invece.

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

CSS Esempio: Flottare a destra un <object>

Nel nostro tutorial CSS, vedrete di più su Proprietà float dettagli.

Sintassi

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

Valore dell'attributo

ValoreDescrizione
leftAllineamento verso sinistra degli oggetti.
rightAllineamento verso destra degli oggetti.
middleAllineamento centrale degli oggetti.
topAllineamento verso l'alto degli oggetti.
bottomAllineamento verso il basso degli oggetti.
  HTML <object> etichetta