Sites in the <iframe> Element

Let’s see how our own site looks in an iframe. You should see the “mobile version,” or a compressed view optimized for smaller portals.

NOTE: This is not an empty element. You should include a closing tag when using the iframe element. Otherwise, unexpected results may occur.

HTML
<iframe src="https://media-ed-online.github.io/intro-web-dev/" width="600px" height="500px"></iframe>

Introduction to Web Design and Development

How-To:

To embed an external site to your page, simply build the <iframe> element, and include the site’s absolute URL.

NOTE: For a variety of reasons, not all sites will work in an iframe. Including a hyperlink to the site below the iframe is a good idea.