HTML Frames
By using frames, you can display more than one page in the same browser window.
iframe syntax:
This URL points to a different web page.
iframe - Setting Height and Width
The height and width attributes are used to define the height and width of the iframe tag.
The attributes default to pixels, but you can specify proportional display (e.g. "80%").
Example
<iframe src="demo_iframe.htm" width="200" height="200" iframe>Try it »
iframe - Removing the Border
The frameborder attribute defines whether the iframe displays a border.
Set the attribute value to "0" to remove the iframe's border:
Example
<iframe src="demo_iframe.htm" frameborder="0" iframe>Try it »
Using iframe to Display a Target Link Page
An iframe can display a page from a target link
The attributes of the target link must use the iframe's attributes, as in the following example:
Example
<iframe src="demo_iframe.htm" name="iframe_a" iframe>
<p>
<a href="https://www.runoob.com" target="iframe_a" rel="noopener" RUNOOB.COM a p>Try it »
HTML iframe Tag
| tag | Description |
|---|---|
| defines an inline iframe |