Horje
How to set Iframe Height and Width

Use the height and width attributes to specify the size of the iframe.


Full Example of Iframe Height and Width

The height and width are specified in pixels by default:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>HTML Iframes</h2>
<p>You can use the height and width attributes to specify the size of the iframe:</p>

<iframe src="https://itupto.com" height="200" width="300" title="Iframe Example"></iframe>

</body>
</html>

Output should be:

Full Example of Iframe Height and Width

Use Style Iframe Height and Width

Or you can add the style attribute and use the CSS height and width properties:
index.html
Example: HTML
<iframe src="demo_iframe.htm" style="height:200px;width:300px;" title="Iframe Example"></iframe> 

Output should be:

Use Style Iframe Height and Width





Category:
Web Tutorial
Sub Category:
HTML Iframes
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference