Assignment 7: Media
Websites in the Iframe Element
Some websites allow their pages to be loaded on other sites using iframes.
Depending on the size of the iframe, you may see different layouts for versions of the site. For example, in the NASA site below you should see a “mobile view” or “compressed view” optimized for smaller portals (in this case, for windows less than ~1025px.)
<iframe src="https://solarsystem.nasa.gov/planets/dwarf-planets/pluto/overview/" width="600px" height="500px"></iframe>
To embed an external site to your page, simply build the
<iframe> element, and include the site’s absolute URL.
Important 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. You can test a site using an iframe checker.