Loading...

Using the <iframe> Element

The <iframe> element allows you to embed another website within the current HTML page. It can be useful for displaying external content like videos, maps, or web applications.

What Is an <iframe>?

The <iframe> (inline frame) is a container that loads another web page into the current one. The src attribute specifies the URL of the page to load.

html

<iframe src="https://example.com" width="600" height="400"></iframe>

Example of an Embedded Page

The example below shows an iframe displaying an external page. It will work properly if the target site allows embedding.

Common Attributes

Common attributes include: src (source), width, height, title, style (custom styles). To remove borders, use CSS or the style attribute.

html

<iframe src="https://example.com" width="500" height="300" title="Example site"></iframe>

When to Use It?

If you want to display YouTube videos, Google Maps, another HTML page, or third-party services on your site, <iframe> is a good choice.

Important Limitations

Not all websites allow embedding via iframe. Many sites block it for security reasons. Also, the embedded content cannot be fully styled with CSS and may negatively affect SEO.

Track Your Progress 🚀

Learn more easily by tracking your progress completely for free.


Top tools

CodeHubBoardly NEWLinksy NEWChromo NEW

Select Language

Set theme

© 2025 ReadyTools. All rights reserved.