Adding Space around an Image

Look carefully at the image in Figure 5.31. If you don’t want your text butting right up to the image, you can use the deprecated vspace and hspace attributes to add a buffer around your image.

Figure 5.31. No space is left, by default, between floating images and the elements they float next to.

To add space around an image:

1.
Type <img src="image.location" where image.location indicates the location on the server of your image.
2.
If desired, type hspace="x" where x is the number of pixels of space to add on both the right and left sides of the image.
3.
If desired, type vspace="x" where x is the number of ...

Get HTML, XHTML, & CSS, Sixth Edition: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.