English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The align attribute specifies the alignment of <iframe> based on surrounding elements, and 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.
Right-aligned <iframe>:
<iframe src="frame_a.htm" width="200" height="200" align="right"> </iframe>Test it out ‹/›
IEFirefoxOperaChromeSafari
Although the align attribute is deprecated, it is still supported by all major browsers.
HTML5 The align attribute of <iframe> is not supported. Please use CSS instead.
in HTML 4.01 The align attribute of <iframe> is deprecated.
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.
in HTML 4.01 In the <iframe> element's align attribute has been 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.
<iframe align="left|right|middle|top|bottom">
Value | Description |
---|---|
left | Align iframe to the left. |
right | Align iframe to the right. |
middle | Center align iframe. |
top | Align iframe at the top. |
bottom | Align iframe at the bottom. |