Why use iframes? Advanced users may discover dozens of uses for iframes, but even novices can take advantage of the convenience and design possibilities they offer.
Display content from your own site
One common use of iframes is displaying an inset block of text, much like a newspaper or magazine might display a related article. For example, you might create a small iframe on your homepage that displays your page of customer testimonials. Your site visitors could then view the testimonials from the homepage as well as the testimonials page itself. (Alternately, you could hide the actual testimonials page and make its contents available only through the iframe.)
Or perhaps your website showcases your artwork. You could display your work in an iframe, allowing visitors to scroll through the iframe to view each piece while continuing to display your biographical and contact information below.
Some users find iframes a convenient way to work with recurring text or page elements, such as mastheads or footers. For instance, rather than typing the same footer information Copyright 2019, XYZ Art. All rights reserved. on every page of your site, you could create a single page, footer.html, that contains this information. You could then add an iframe to the bottom of each page in your site that displays the contents of footer.html.
Why bother? This strategy can save you time on website maintenance: When it comes time to make a change to the recurring content changing the copyright date to 2014, for instance, you'll need to alter only a single file (footer.html, in our example). The iframes will automatically display the updated content.
Display content from another website
You can also use iframes to display the contents of a page from another website. Rather than linking to photographs your colleague posted on his own website, for example, you could use an iframe to display the photo gallery itself. If you manage multiple websites, you could use this feature to display parts of one website in the pages of another.
Important: Please be aware that when you use an iframe to display content from another website, you are virtually copying that website's content into your own page. To avoid possible copyright infringement, we recommend that you always seek permission if you'd like to display content from another site on your page, and that you accompany this content with appropriate information about the author.
Furthermore, we suggest that you always include the default border on iframes that will display non-original content, as omitting the border may blur the distinction between someone else's content and your own content.