HTML iframe elements helps us to display other webpages in a webpage. It is just like having a mini browser inside a webpage or another webpage inside a webpage.
An iframe can be defined using the <iframe>
To load a URL in an iframe element, we use the src
attribute whose value is a path to the webpage to load.
The path may be absolute e.g a full URL like google.com
or relative e.g index.html
element is an inline - block element. This means, it can be display along other elements while you can also adjust its width.
- The <iframe> tag allows you to create a box element where another webpage contents can be view.
- To specify a URL to load, you make use of the src attribute whose value should be the URL.
- iframe elements are inline - block.