vspaceattribute is similar to
hspaceand provides a bit of breathing space above and below an image, although it’s not exactly a precision design tool. Figure 1 shows the problem that occurs when an image is placed between paragraphs (the spacing appears to be unequal because the
pelement already has a bottom margin of its own, which exists in addition to the
vspaceof 10 is applied (note the space above and below image)
vspace attribute is set to
pixels around a left-aligned image:
<p><img src="giant-prawn.jpg" alt="The Giant Prawn at Ballina" align="left" vspace="10"/>Driving along, we spotted a giant prawn, so we had to stop and take a closer look.</p>
This attribute takes as its value a number representing the amount of space to appear above and below the image in pixels.
Although support for this attribute is good, it’s now deprecated, and is highly presentational in its nature. The desired visual effects can all be achieved with CSS and, as such, this attribute shouldn’t be used—it’s presented here for informational purposes only.
There are no comments yet.