Before you can put an image on a Web page, you need to know the name of the image file and where it's stored on your server (its source, of course.) That way you can instruct the browser on how to find the image it needs.
The easiest place to save the image is in the same folder or directory as your HTML source file, which is where the browser will automatically look for it. If you have many images to organize, you may want to place them in a single folder, called "images" or "pictures," then place that folder (or directory) in the same directory as your HTML file.
My image is called "planetlogo.gif," and it's in a folder called "images," which is in the same folder on our server as this HTML file.
The HTML for my logo image will read like this:
The picture looks like this:
Using the image align tag, You can control where the image is placed on the page. For example, I can line it up on the left:
Which aligns it to the left:
Or I can aline it up on the right:
Centering an image is a bit more complicated, because <img align=center> doesn't work on most browsers. Instead, you'll have to first center the paragraph, with <p align=center> (even if you don't have any text), and then place the image.
So, to center the logo, we'd code:
And it would appear like this:
PO Box 22157 Knoxville, Tennessee 37933-0157
Telephone: 865-300-3804 FAX: 865-692-9247
© 1998, 1999, 2000 PLANETWEBDESIGN
TECHNOLOGIES, Inc. All rights reserved