HTML iframe

HTML iframe is used to place another web page content within current web page.Basically, it is a container that shows other web page information within that container.

General syntax of iframes:

<iframe src="..." title="description"> </iframe>

Example

Source Code

          <iframe src="hello.html" title="result page"></iframe>
        
Try it now

Note: Here, the URL specifies the address of the webpage while the title denotes the description of the web page.

Assigning Height And Width of An Iframe Using Iframe Property

Source Code

          <iframe src="..." width="100%" height="300" style="border:1px solid black;"></iframe>
        
Try it now

Note: To provide height and width of iframe, use height and width property of iframe.

Providing Height And Width of An iFrame Usign CSS

Source Code

          <iframe src="...." style="height:200px;width:300px;" title="iframe Example"></iframe>
        
Try it now

Note:To provide height and width of iframe ,use height and width property of CSS.

Removing Iframe Border

Source Code

          <iframe src="demo_iframe.htm" style="border:none;" title="Iframe Example"></iframe>
        
Try it now

Note:HTML Iframe border can be removed very easily by CSS style property of border.

Providing Border Of Ifarme

Source Code

          <iframe src="...." style="border:2px solid red;" title="Iframe Example"></iframe>
        
Try it now

Note:The HTML iframe border can be provided by CSS style property of the border.

Online Test / Quiz

Web Tutorials

HTML iframe
Html Tutorial HTML
Javascript Tutorial JAVASCRIPT
Css Tutorial CSS
Bootstrap 5 Tutorial BOOTSTRAP 5
Bootstrap 4 Tutorial BOOTSTRAP 4