Latest web development tutorials

HTML DOM IFrame align property

Frame / IFrame Object Reference Frame / IFrame objects

Definition and Usage

align property sets or returns the value of the iframe element align attribute.

align attribute specifies how to arrange according to the surrounding text iframe.

Tip: iframe element is an inline element (it's not insert a new line on the page), which means text and other elements can be around it.Therefore, it can be arranged iframe according to the surrounding text.

grammar

iframeObject.align=value

align attribute can have the following values:

描述
left iframe 左对齐
right iframe 右对齐
middle iframe 居中对齐
top iframe 顶部对齐
bottom iframe 底部对齐


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support align attribute


Examples

Examples

iframe Align Right:

document.getElementById ( "myframe") align = "right".;

try it"


Frame / IFrame Object Reference Frame / IFrame objects