HTML Frame
By using frames, you can display more than one page in the same browser window.
iframe syntax:
<iframe src="URL.html"></iframe>
The URL points to different web pages.
iframe - set height and width
height and width properties are used to define the height and width of the iframe tag.
The property is set in pixels by default, but you can specify it to display in proportion (e.g., "80%").
iframe - remove borders
frameborder property is used to define whether the iframe represents borders.
Set the property value to "0" to remove the borders of the iframe:
Use iframe to display the target link page
iframe can display a page from a target link
The target link's properties must use iframe's properties, as shown in the example:
Example
<iframe src="demo_iframe.htm" name="iframe_a"></iframe>
<p><a href="https://www.example.com" target="iframe_a" rel="noopener">example.com</a></p>
Try it »
HTML iframe tag
| Tag | Explanation |
|---|---|
| <iframe> | Define an inline iframe |