| Home Web | Top Bottom | Contents Prev Next |
hspace and vspace add blank space around an image. You specify the number of pixels of space you want. hspace puts this amount of space on both the left and right side of an image. vspace puts this amount of space both above and below an image.
Here's an example of hspace. The first image has no hspace. The second has hspace="20".
Some text.
Some text.
Some text.
Some text.
border can be used to put a border around an image. Here's an example of an image with border="10".
The borders created by border are basically ugly, and you have no control over what they look like. The only control you have is how many pixels wide the border is. For this reason, nobody ever uses border to create borders around images. Tables and CSS both offer ways to make better looking borders. Or you can use a graphics program to put a border (or "frame") around an image you can make it as elaborate as you like. Here's an example of an image in which I've created a frame in Paint Shop Pro:
The real usefulness of border is for getting rid of borders. When you use an image as a link, the browser by defaults draws a border around the image. This was thought useful in early browsers that supported images and image links so that the user could immediately see which images are links. That IS useful, but the borders look rather ugly and you almost never see anyone leave them in. Here are two images being used as links (both will take you back to the top of the page). The first has no border, and the second has border="0".
| Home Web | Top Bottom | Contents Prev Next |