How to create an inline frame using HTML5 ?

In this article, we will create an inline iframe by using a <iframe> tag in a document.
It represents a fixed rectangular area within the document in which the browser can display a separate document along with scroll bars and borders. Inline frames are used to embed another document within the current HTML page.
Syntax :

<iframe src="URL"></iframe>

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        How to create an inline 
        frame using HTML5?
    </title>
</head>
  
<body>
    <h2>Hlo GeeksForGeeks</h2>
  
    <h2>
        How to create an inline 
        frame using HTML5?
    </h2>
  
    <p>Content goes here</p>
  
    <iframe src=
        height="300" width="400">
    </iframe>
  
</body>
  
</html

chevron_right


Output:

Example 2:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
        How to create an inline 
        frame using HTML5?
    </title>
</head>
  
<body>
    <h2>Hlo GeeksForGeeks</h2>
  
    <h2>
        How to create an inline 
        frame using HTML5?
    </h2>
  
    <iframe height="300" width="350"
        src="
        name="iframe_a"></iframe>
  
</body>
  
</html>

chevron_right


Output:

Supported Browser are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.