Easy Tutorial
❮ Prop Style Pagebreakinside Prop Table Rules ❯

IFrame align Attribute


Definition and Usage

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

The align attribute specifies how the iframe is aligned relative to the surrounding text.

Tip: 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, it can align the iframe relative to the surrounding text.

Syntax

The align attribute can have the following values:

Value Description
left Aligns the iframe to the left
right Aligns the iframe to the right
middle Centers the iframe alignment
top Aligns the iframe to the top
bottom Aligns the iframe to the bottom

Browser Support

All major browsers support the align attribute.


Example

Aligning the iframe to the right:

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

❮ Prop Style Pagebreakinside Prop Table Rules ❯