HTML Iframe

HTML Iframe is the section 13 of Beginner’s Guide to HTML.

If you want to display a web page within a web page, Iframe comes in handy. Iframe means inline frame.  Commonly used in the situations like web pages for each item link on your menu. Syntax is like as follows.

[code language=”html”]

So in the above code snippets it will display Disney website within your webpage inside of a frame.

Width and Height

You can also define the height and width of the frame either in pixels or as a percentage. If you are using an iframe for display each item on the menu, make sure to define correct width and height of the frame section.

[code language=”html”]

Checkout what happens when the correct width and heights are not setted on a inline frame. You’ll see scroll bars around the iframe, horizontally and vertically. When you set the correct width and height, those scroll bars will goes away.


Frame Border

Using the frameborder attribute you can specify whether or not to display a border around the iframe. Use 0 value not to display a border. By default there will be a border.

[code language=”html”]

Target Link

Iframes can be used with links interconnected.  You can specify on which iframe the url of the link should displayed. To do that you need to give a name for the iframe and that name should be refer in the target attribute of the link.

[code language=”html”]

Disney Website


So in here when we click on the link Disney Website the web page of it will display on the targeted iframe my_iframe rather than your_iframe.

So in this section we came into know about iframes. Display inline web pages. In the next section we’ll do lot in colors in HTML.



Let’s learn about Using Colors in HTML.

Written by Sandeep Likhar

Sandeep Likhar is from India, where he is a blogger, eBook designer, and founder of LetsDnD. He has 6 years of experience in the industry as a Digital Publishing Expert and eBook Converter, providing services to authors, publishers, and distributors worldwide. He is proficient in converting books into various formats, such as HTML, epub, mobi, word, PDF, including all major online platforms like iTunes, Kobo, Kindle, CreateSpace, B&N, Smashwords, and more.


Leave a Reply
  1. I have read so many articles or reviews concerning the blogger lovers but this
    post is actually a pleasant post, keep it up.

  2. you are truly a just right webmaster. The web site loading speed is
    amazing. It kind of feels that you are doing any unique trick.
    Moreover, The contents are masterpiece. you have done
    a wonderful job in this subject!

  3. Hey! Ѕomeone in mү Myspace gгoup shared thiѕ site wіth սs so I
    came to take a look. I’m definitely loving tҺe information. I’m bookmarking and will be tweeting
    this to my followers! Outstanding blog ɑnd superb style and design.

Comment Below