The <iframe>
element is used to embed another document within the current HTML document. It creates a nested browsing context, allowing you to display content from another source, such as another webpage or multimedia content.
You can define an iframe in your HTML using the <iframe>
tag. Here’s a basic example:
<iframe src="https://www.example.com"></iframe>
The src
attribute specifies the URL of the page to embed.
Here is a simple iframe that loads a webpage:
This iframe includes width, height, and border attributes:
This iframe is styled to be responsive: