What is the significance of hspace and vspace attributes in HTML ? Where are these attributes used ? Any ideas.....
What is the significance of hspace and vspace attributes in HTML ? Where are these attributes used ? Any ideas.....
HSPACE and VSPACE are very impressive image attributes in HTML.
HSPACE - an image attribute that sets the horizontal space between the image and surrounding text.
VSPACE - an image attribute that sets the vertical space between the image and surrounding text.
HSPACE means horizontal space and VSPACE means vertical space.
Using HSPACE and VSPACE attributes within the IMG SRC tag allows you to specify horizontal and vertical padding around an image. This makes the page look really impressive and nicely presented.
For example,
<IMG SCR="tower.gif" HSPACE=10 VSPACE=10>
the above syntax will give the space 10 pixels above, below, and on each side of your tower image.
HSpace and VSpace are less popular features in HTML that has the great ability to add a blank border around images both horizontally and vertically. This is very useful when the page consists of both - text and images, allowing the text to present around the image without appearing ugly by brushing right up to the image.
The tags used are vspace for vertical space at the top and bottom of the image, and hspace for horizontal space at the left and right of the image. The amount of space is measured in pixels and is unlimited.
See an example below -
<img src="image.gif" width="40" height="40" hspace="3" vspace="3" border=0>
Bookmarks