Javascript AJAX jQuery HTML PHP Example MORE

HTML Iframe tag with Example

In HTML iframe is used to display a web page within a web page.

Syntax

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

Example

<!DOCTYPE html>
<html>
<body>
    <iframe src="demo_iframe.htm"></iframe>
</body>
</html>
			

Run it yourself

Iframe - With Height and Width

Height and width is used to specify the size of the Iframe.

<!DOCTYPE html>
<html>
<body>
    <iframe src="demo_iframe.htm" height="200" width="300"></iframe>
</body>
</html>

Run it yourself

Iframe -without the Border

By default an iframe has it’s own broder.

To remove the border please see the below the example.

<!DOCTYPE html>
<html>
<body>
    <iframe src="demo_iframe.htm" style="border:none;"></iframe>
</body>
</html>
			

Run it yourself