HTML iframe align property
Examples
Right-aligned <iframe>:
</iframe>
try it"
Browser Support
Although align attribute is obsolete, but the property still get the support of all major browsers.
Definition and Usage
HTML5 does not support the <iframe> align attribute. Use CSS instead.
In HTML 4.01, <iframe> The align attribute is deprecated .
Attribute specifies align <iframe> with respect to the alignment of the surrounding elements.
<Iframe> element is an inline element (does not insert a new row on the page), which means text and other elements can be around at their surroundings. Therefore, align attributes can help us provisions <iframe> with respect to the alignment of the surrounding elements.
Compatibility Notes
In HTML 4.01, <iframe> The align attribute is deprecated. Use CSS instead.
CSS Syntax: <iframe style = "float: right">
CSS Example: right-floating iframe
In our CSS tutorial you can find more information about the float property detail.
grammar
Property Value
值 | 描述 |
---|---|
left | 向左对齐 iframe。 |
right | 向右对齐 iframe。 |
middle | 居中对齐 iframe。 |
top | 在顶部对齐 iframe。 |
bottom | 在底部对齐 iframe。 |
HTML <iframe> tag