Skip to content
Related Articles

Related Articles

HTML | <img> vspace Attribute

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 06 Jan, 2022
Improve Article
Save Article

The HTML <img> vspace Attribute is used to specify the number of whitespaces on bottom and top side of an image.

Note: The HTML vspace Attribute not supported by HTML5


<img vspace="pixels">

Attribute Values:

  • pixels: It specifies the number of whitespaces on top and bottom of an image in terms of pixels.


<!DOCTYPE html> 
        HTML img vspace Attribute 
        h1, h2 {
        h3 {
    <h1 style="color:green;"
    <h2>HTML <img> vspace Attribute</h2>
    <h3>Image without vspace Attribute</h3>
        <img id="myImage" src
            alt="Submit" width="42"
            height="42" align="middle"/>
        It is a computer science portal for geeks
    <h3>Image with vspace Attribute</h3>
        <img id="myImage" src
            alt="Submit" vspace = "60" width="42" height="42"
        It is a computer science portal for geeks


Supported Browsers: The browser supported by HTML <img> vspace Attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!