HTML Iframe

HTML Iframe

It is used to display a web page within another web page and used to display external objects including other web pages within a web page.

Below the syntax of iframe:

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

Set Width and Height of iframe

We can set the width and height of iframe by using "width" and "height" attributes. By default, the attribute's values are specified in pixels but we can also set them in percent. i.e. 55%, 80%, 95% etc.

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>HTML iframe</title>  
    <iframe src="" width="500" height="500">