How to use IFrame in Html

An iframe is used to display a web page within a web page.

Iframe Syntax
An HTML iframe is defined with the <frame> tag:

<iframe src="page_url"> </iframe>

The src attribute of iframe specifies the URL address

Set Iframe Height and Width
You can set height and width of iframe as per your need, any specified values are considered in pixels by default, but they can also be in percent

<iframe src="page_url" width="400" height="150"> </iframe>
            
<iframe src="page_url" width="90%" height="50%"> </iframe>

Also can use style tag, like this style="width:90%;height:50%;";

Iframe source Example

Now let's look at example, i am calling this current page within iframe

Iframe Border Example
You can change the iframe border style using style tag, also can make it without border
            style="border:0px;width:90%;height:200px;"


HTML Tutorial | Web Designing Course | HTML5 Introduction