HTML IFRAMES

You can define an inline frame with HTML tag <iframe>.

The <iframe> tag defines a rectangular region within the document in which the browser can display a separate document, including scrollbars and borders.

The src attribute is used to specify the URL of the document that occupies the inline frame.

The syntax is: <iframe src=”URL“></iframe> 

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

Apart from src there are a few other attributes

1. 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.

2.Frame Border:

By default, an iframe has a border around it.

To remove the border, add the style attribute and use the CSS border property.With CSS, you can also change the size, style and color of the iframe’s border:

<!DOCTYPE html>
<html>
<head>
<title>HTML Iframes</title>
</head>
<body>
<p>Document content goes here...</p>
<iframe src="http://qatechhub.com/" style="border:2px solid grey;" height="500" width="700">
Sorry your browser does not support inline frames.</iframe>
<p>Document content also go here...</p>
</body>
</html>

PS: For any questions, queries, feedback and comments feel free to write us at support@qatechhub.com and amruta@qatechhub.com

Saurabh Dhingra

About the Author

Saurabh Dhingra

Follow Saurabh Dhingra: