HTML Frames

78 Views
No Comments

By using frames, you can display more than one page in the same browser window.

iframe syntax:

<iframe src="URL"></iframe>

This URL points to a different web page.

iframe – set height and width

The height and width attributes are used to define the height and width of the iframe tag.

The property is in pixels by default, but you can specify a proportional display (e.g. “80%”).

<iframe src="https://www.it-res.com" width="600" height="600"></iframe>

Try it yourself»

iframe – remove border

The frameborder attribute is used to define whether the iframe represents a border.

Set the property value to “0” to remove the iframe border:

<iframe src="https://www.it-res.com" width="600" height="600" frameborder="0"></iframe>></iframe>

Try it yourself»

Use iframe to display the target link page

iframe can display a target link page

The target link attributes must use the iframe attributes, as shown in the following example:

Examples

<iframe src="https://www.it-res.com" name="iframe_a" width="600" height="600"></iframe>
<p><a href="https://tools.it-res.com" target="iframe_a" rel="noopener">IT Resource Online Tools</a></p>

Try it yourself»

HTML iframe tag

Tag Description
<iframe> Define an inline iframe
END
 0
Comment(No Comments)