Spread the love

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

TagDescription
<iframe>Define an inline iframe
The resources on this site come from the Internet and are used for learning and research by Internet enthusiasts. If your rights are accidentally infringed, please contact the webmaster in time to handle and delete them. Please understand!
IT Resource Hub » HTML Frames

Leave a Reply

Provide the best collection of resources

View Now Learn More