Menu

Search
Basics
How do I add images or graphics?
This is very easy but you must remember:

You add an image or graphic with the image tag <IMG SRC>

You must use attributes to specify the source and size

JPEG is best for photographs

Gif is good for graphics art involving flat areas, colour, lines and text.

  This is how you do it (substitute your own info where you see blue text):

<img src="your filename.gif (or .jpg)" width="yourwidth" height="yourheight" alt="my image name">

To centre the image, this is what you do:

<center><img src="your filename.gif (or .jpg)" width="yourwidth" height="yourheight" alt="my image name"></center>

  back to the top
  You can also use the align attribute to align images to the left, centre, and right (left is the default):

turtle<img src="turtle.gif" align="left">

<img src="turtle.gif" align="center">turtle


turtle

<img src="turtle.gif" align="right">



Remember that you need to save the images in the same folder as the web page. If you do not, when you look at your page you will see a red x where the image should be. This means you either did not save it in the same folder, or there is an error in your HTML code.

  back to the top
 

How do I add spaces between my images?
You can add vertical and horizontal spaces to your images using a tag called vspace or hspace. Vspace is the vertical space (space above and below) tag and hspace is the horizontal space (space from side to side) tag. Add the space tag to your img src tag like this:

<img src="cat.gif" hspace="15">

Using the above tag will give you a space between 2 images of 15 pixels. You can add the vspace and the hspace tags together to create space above, below, and beside your images.

Hspace = 15:
 

catcatcatcat

Vspace= 8, Hspace= 8:

catcatcatcat
catcatcatcat

  back to the top
 
back   next