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

HTML Reference Manual

HTML Tag Directory

HTML: <iframe> align attribute

The align attribute specifies the alignment of <iframe> based on surrounding elements, the <iframe> 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 <iframe> based on surrounding elements may be very useful.

 HTML <iframe> etichetta

Online Example

Right-aligned <iframe>:

<iframe src="frame_a.htm" width="200" height="200" align="right">
</iframe>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

Although the align attribute has been deprecated, it is still supported by all major browsers.

Definition and Usage

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

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

L'attributo align specifica il modo in cui allineare l'<iframe> in base agli elementi circostanti.
L'elemento <iframe> è un elemento inline (non inserisce una nuova riga nella pagina), il che significa che il testo e gli altri elementi possono circondarlo. Pertanto, potrebbe essere utile specificare il modo in cui allineare l'<iframe> in base agli elementi circostanti.

Commenti di compatibilità

In HTML 4.01, l'attributo align dell'<iframe> è obsoleto. Usa CSS al suo posto.

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

CSS Esempio: iframe a destra fluttuante

Nel nostro tutorial CSS, puoi trovare ulteriori informazioni su Proprietà float dettagli.

Sintassi

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

Valore dell'attributo

ValoreDescrizione
leftAllineamento iframe a sinistra
rightAllineamento iframe a destra
middleAllineamento iframe al centro
topAllineamento iframe in alto
bottomAllineamento iframe in basso
 HTML <iframe> etichetta