Adding Graphics
"Multimedia? As far as I'm concerned, it's reading with the radio on!" (Rory Bremner)
In HTML, images are defined with the <img> tag.
The <img> ELEMENT has a composite tag, which means that one tag contains all the attributes and the closing slash (/).
To display an image on a page, you need to use the SRC ATTRIBUTE.
src is an abbreviation of "source". The value of the src attribute is the URL (location) of the image you want to display on your page.
The syntax of defining an image is as follows:
<img src="the location of the image"
width="how wide it is in pixels"
height="how high it is in pixels"
alt="what to display if the image cannot be viewed" />
The location should be the web address where the image is stored.
is in the main images folder on this site and is defined in the markup for this page as:
<img src=" ../images/littledevilr.gif width="69" height="73"
alt="Imp Guide little devil logo" />
The browser places the image where the image tag occurs in the markup of the document. If you place an image in your first paragraph markup, it will be displayed in the first paragraph. If you place it in the second paragraph markup, it will be displayed in the second paragraph etc.
All images should always be placed with BLOCK ELEMENTS such as <p></p> tags
Note: Images can be useful in decorating a web page or provide additoinal information in themselves, However, every images you place in an HTML document will need to be downloaded before your page can be displayed properly. Loading images take time, so use images sparingly.
Warning
When adding images, do not be tempted to link directly to other people's images on their site to display on your web pages. This is known as Bandwidth Theft and can be viewed as serious abuse. After ensuring that you are allowed to copy such an image (if neccessary email the site owner), save a copy on your own site and link to it there.