HTML Iframes

HTML iframes allow you to embed another HTML document within your current web page. They are commonly used to display content from other sources, such as maps, videos, or external websites. The `<iframe>` element is used to create an inline frame in your HTML document.

Here's the basic syntax for creating an iframe:

<iframe src="URL" width="WIDTH" height="HEIGHT"></iframe>
  • `src`: Specifies the URL of the document you want to embed.
  • `width` and `height`: Set the dimensions of the iframe. You can use pixels or percentages as units.
<!DOCTYPE html>
    <title>HTML Iframe Example</title>
    <h1>Iframe Example</h1>
    <p>This is an example of an iframe embedding another webpage:</p>
    <iframe src="" width="800" height="600"></iframe>

In this example, the iframe embeds the webpage "" with a width of 800 pixels and a height of 600 pixels.

Was this page helpful?