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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <iframe> align-Attribut

Das align-Attribut bestimmt die Ausrichtung des <iframe> basierend auf den umgebenden Elementen, das <iframe>-Element ist ein Inline-Element (es fügt keine neue Zeile auf der Seite ein), was bedeutet, dass Text und andere Elemente um es herum umgeben können. Daher kann es nützlich sein, die Ausrichtung des <iframe> basierend auf den umgebenden Elementen zu bestimmen.

 HTML <iframe> Tag

Online-Beispiel

Rechtsbündiges <iframe>

<iframe src="frame_a.htm" width="200" height="200" align="right">
</iframe>
Testen Sie es heraus ‹/›

Browserkompatibilität

IEFirefoxOperaChromeSafari

Obwohl das align-Attribut veraltet ist, wird es von allen gängigen Browsern unterstützt.

Definition und Verwendung

HTML5 Der align-Attribut des <iframe>-Elements wird nicht unterstützt. Verwenden Sie stattdessen CSS.

in HTML 4.01 Der align-Attribut des <iframe>-Elements ist veraltet.

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 useful.

Compatibility Comments

in HTML 4.01 In the <iframe> align attribute is deprecated. Please use CSS instead.

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

CSS Example: Float iframe to the right

In our CSS tutorial, you can find more about float Attribute details.

Syntax

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

Attribute Value

ValueDescription
leftAlign iframe to the left.
rightAlign iframe to the right.
middleCenter align iframe.
topAlign iframe at the top.
bottomAlign iframe at the bottom.
 HTML <iframe> Tag