You are currently viewing HTML Iframe tag | Lesson 23 HTML Tutorial
HTML Iframe Image

HTML Iframe tag | Lesson 23 HTML Tutorial

in this lesson “HTML Iframe tag” you will learn how to use frames and how to adjust it’s attribute. Also you will learn how to embed new website to yours.

Visual Explain in This Video for Further Understand:

HTML Frames tag Video

<iframe> tag is used to display a web page within a web page.

Ifreame example:

<iframe src="" height="200"></iframe> 

The Result:

Iframe Syntax

An HTML iframe is defined with the <iframe> tag.


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

The src attribute specifies the URL (web address) of the inline frame page.

Iframe – Set Height and Width

Use the height and width attributes to specify the size of the iframe. The attribute values are specified in pixels by default, but they can also be in percent (like “80%”) just to make it responsive.


 <iframe src="" height="200" width="300"></iframe> 

Or we can use CSS to set the height and width of the iframe.


 <iframe src="" style="height:200px;width:300px;"></iframe> 

Iframe – Remove the Border

By default, an iframe has a border around it. To remove the border, add the style attribute and use the CSS border property.


 <iframe src="" style="border:none;"></iframe> 

Iframe – Target for a Link

An iframe can be used as the target frame for a link. The target attribute of the link must refer to the name attribute of the iframe.


 <iframe src="" name="iframe_a"></iframe>

<p><a href="" target="iframe_a"></a></p> 

This post is one of the HTML5 for deep understanding course. where we will learn every common elements from basic to the advanced element.

In addition each lesson has a video which you could visit and watch for more practicing and for deep understanding.

We hope that we could give the best for you and for the deep and easy understanding.

You could follow the series from our website and go to categories and then programming and then Choose the course you want then just click next post to go step by step.

Finally we hope every thing is works as you suspect.

Consequently You could follow us at :

Website URL:


Twitter: http://


Facebook: http://


This Post Has One Comment

Leave a Reply