HTML img vspace attributes
Examples
The top and bottom margins of 50 pixels:
<p><img src="smiley.gif" alt="Smiley face" width="42" height="42" align="middle" vspace="50">这是一些文本。这是一些文本。这是一些文本。</p>
try it"
Browser Support
All major browsers support vspace attributes.
Definition and Usage
HTML5 does not support the <img> vspace attributes. Use CSS instead.
In HTML 4.01, <img> the vspace attribute obsolete .
vspace attribute specifies the top and bottom of the blank image.
Compatibility Notes
In HTML 4.01, <img> the vspace attribute is deprecated. Use CSS instead.
CSS syntax: <img style = "margin: 50px 0px">
CSS Example: with a margin image
In our CSS tutorial you can find more information about the margin property detail.
grammar
<img vspace="pixels">
Property Value
值 | 描述 |
---|---|
pixels | 图像顶部和底部的空白,以像素计。 |
HTML <img> tag