The next command that we will explore is the command used to put an image on a page. This command has many different modifiers and can be used to change the size of the image by resizing it to the specified pixel size. The first thing that is necessary to put an image on your page is an image. This is most likely in the form of a gif but a jpeg image will work as well. Once this image has been found you must upload it onto your server. It would be wise to upload the image into the same directory as your page itself, at least for now. Once this has been upload you must decide if the image is going to link to somewhere or just be there doing “nothing.” This should not be a tough decision, if the image refers to a specific document it will mostly likely be linked to a certain page, if the image is a picture of you and your family on vacation it will most likely not be linked. For now we will say that it is not linked. Now you must decide if you want the image to be shrunk down or blown up artificially in order to make a thumbnail or if you just don’t like the size of the image how it is. Let’s say you decide to shrink it to 65 pixels high by 75 pixels wide.
In order to enter this into your source you will need to enter an angle bracket “<“ then the letters IMG SRC= then the title of the image then the modifiers then an angle bracket “>”. If the image is called image.gif then the source code for the image without any modifiers will look like this:
<IMG SRC=”image.gif”>
If the image is going to be the pixel size previously mention the source code will look like this:
<IMG SRC=”image.gif” WIDTH=”75” HEIGHT=”65”>
It is also possible to insert a command that will tell people what the picture is of if they did not download it or pressed stop on there web browser. Let’s say this will be called View this Picture. The modifier which preforms this operation is the letters ALT then an equal sign “=”. In order to do this to image.gif the source would look like this:
<IMG SRC=”image.gif” WIDTH=”75” HEIGHT=”65” ALT=”View this Picture”>
The next possible modifier of an image would be used if you want to put the image inside a link command. When the person clicks on the image they will be linked to the page that the image refers to. A person can sometimes tell if the image is a link if you leave a border on it. A border is the color of the LINK command (previously mentioned) if it has not been visited and the color of the VLINK command if it has been visited. In order to make a link to my page, let’s say, you would first need a gif that relates to my page. Let’s call this gif logo.gif. The way to tell the browser that you want the image to be a link is to simply put the IMG SRC command inside the place where text would go on the A HREF command. The final source code of a page with a link to my page and a image called logo.gif without any special modifiers in the IMG SRC command (Any modifier that is used when inserting an image into a web page that is not linked can be used when inserting and image in a web that is linked) would look like this:
But sometimes a border on the image can be unsightly. In order to get rid of the border a modifier must be entered in the IMG SRC command that has the word border then an equal sign “=” then the number 0. A person will most likely know that this is a link because when they hold their mouse over it the link “hand” will form. The final source of an IMG SRC command without a border would look like this: