<iframe src="" vspace="" hspace="">

Browser
  • IE
  • O
Type

The vspace and hspace attributes of the IFRAME element adds white space around the iframe.


<iframe src="example.html" vspace="30" hspace="30"></iframe>

Attribute Value Explanation
vspace=" " pixels vertical white space (the top and bottom sides)
hspace=" " pixels horizontal white space (the left and right sides)

Extension attributes. (Non standard attributes)

Example

vspace: 10px, hspace: 30px

<p>
<iframe src="iexample_b.html" width="300" height="100" align="left" vspace="10" hspace="30">Alternate content</iframe>
some text some text<br>some text some text<br>some text ...
</p>

Output

some text some text
some text some text
some text some text
some text some text
some text some text
some text some text
some text some text
some text some text
some text some text
some text some text
some text some text
some text some text