An inline frame (iframe) is an HTML element that loads another webpage inside the current webpage. It is commonly used for videos, maps, advertisements, and external web content.
An iframe is an HTML document embedded inside another HTML document.
<iframe src="URL" title="description"> </iframe>
<iframe src="https://www.example.com" width="600" height="400"> </iframe>
The src attribute specifies the webpage to display inside the iframe.
| URL Type | Description |
|---|---|
| Absolute URL | Points to another website. |
| Relative URL | Points to a file within the same website. |
<iframe src="page.html" sandbox> </iframe>
The sandbox attribute provides extra security by restricting what the embedded page can do.
Which attribute specifies the webpage displayed inside an iframe?