Google News
logo
HTML Iframe
The <iframe> tag is not somehow related to <frameset> tag, instead, it can appear anywhere in your document. The <iframe> tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders.

The src attribute is used to specify the URL of the document that occupies the inline frame.
Example : Normal iframe
<html>
    <head>
    <title>HTML Iframes</title>
    </head>
    <body>
      <div style="border:2px solid #999;">
        <h3 align="center">Displaying Sample iframe</h3>
        <iframe src="iframe-example.html" width="100%" height="250"></iframe>
      </div>
   </body>
</html>
Output :

Displaying Sample iframe

Example : Goole Maps
<html>
    <head>
    <title>HTML Iframes</title>
    </head>
    <body>
      <div style="border:2px solid #999; margin:5px 0px;">
        <h3 align="center">Displaying Google Maps</h3>
        <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d61823.
        477891650684!2d79.94568504670892!3d14.
        429044167339358!2m3!1f0!2f0!3f0!
        3m2!1i1024!2i768!4f13.
        1!3m3!1m2!1s0x3a4c8cca0e958771%3A0xd3036c2025161f55!
        2sNellore%2C+Andhra+Pradesh!5e0!3m2!1sen!2sin!4v1496366711161"
         width="100%" height="250" frameborder="0" style="border:0" allowfullscreen></iframe>
      </div>
   </body>
</html>
Output :

Displaying Google Maps