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





Related Articles
What is HTML Iframes HTML Iframes
How to set Iframe Height and Width HTML Iframes
How to remove Iframe Border HTML Iframes
How to create HTML Iframe - Target for a Link HTML Iframes

Single Articles
Full Example of Iframe Height and WidthHTML Iframes
Use Style Iframe Height and WidthHTML Iframes

Read Full:
HTML Iframes
Category:
Web Tutorial
Sub Category:
HTML Iframes
Uploaded by:
Admin
Views:
106


Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_iframe_height_width_css