Web Development

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”]
[/code]

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”]
[/code]

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.

iframe

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”]
[/code]

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

[/code]

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.

 

WHAT’S NEXT?

Let’s learn about Using Colors in HTML.

Join Our Newsletter Today

Stay updated with all latest updates.
Give it a try, you can unsubscribe anytime.
Subscribe
SUBSCRIBE NOW

About the author

Sandeep Likhar

Sandeep Likhar from Indore India, Blogger, eBook Designer and Founder of LetsDnD. Having five years of experience in industry as a Digital Publishing Expert and eBook Converter providing services to Authors, Publishers and distributors worldwide. Proficient in converting books into various formats HTML, epub, mobi, word, PDF including all major online platforms iTunes, Kobo, Kindle, Createspace, B&N, Smashwords and more.

Leave a Reply

3 Comments on "HTML Iframe"

Notify of
avatar
Sort by:   newest | oldest | most voted
Eddie Rosario
Guest

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

Joeann
Guest

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!

Isla
Guest

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.

wpDiscuz
DON’T MISS OUT!
Subscribe To Newsletter
Be the first to get latest updates and exclusive content straight to your email inbox.
Stay Updated
Give it a try, you can unsubscribe anytime.

Join Our Newsletter Today

Stay updated with all latest updates.
Give it a try, you can unsubscribe anytime.
Subscribe
SUBSCRIBE NOW