HTML
The vspace attribute
Example
An image with 50 pixels of margin on the top and bottom:
This is some text. This is some text. This is some text.
Try it »
Browser support





All major browsers support the vspace attribute.
Definition and Usage
HTML5 does not support The vspace attribute. Use CSS instead.
In HTML 4.01, The vspace attribute is deprecated.
The vspace attribute specifies the whitespace above and below the image.
Compatibility notes
In HTML 4.01, The vspace attribute is deprecated. Use CSS instead.
CSS syntax:
CSS example: image with margins
In our CSS tutorial, you can find more details about The margin attributedetails.
Syntax
Attribute values
| Value | Description |
|---|---|
| pixels | The whitespace above and below the image, in pixels. |
HTML tag