<iframe src="" width="" height="">

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

The width and height attributes of the IFRAME element specifies the width and height of the iframe.


<iframe src="example.html" width="300" height="100"></iframe>

Attribute Value Explanation
width=" " pixels or % the size of the width
height=" " pixels or % the size of the height

Example


<p><iframe src="iexample_b.html" width="300" height="100">Alternate content</iframe></p> 

<p><iframe src="iexample_c.html" width="100%" height="100">Alternate content</iframe></p>

Output