Images may be added to your web page as easily as links. The <img> tag is used to define an image. This tag does not have a closing tag. However, there are parameters defined for this tag. The following example adds an image to a Web Page:
<img src="sunset.gif" alt=”This will be shown if the image does not display.” />
The alt parameter is used to define a piece of text to be displayed for when the browser doesn't successfully load the image. This can happen if there is a problem with the internet traffic, or if one of the connections between the server and the client (browser) gets broken, or if the web surfer clicked on the stop button to stop loading the image.
To define the height and width of the image, rather than letting the browser compute the size, use the height and width attributes.
<img src="sunset.gif" height="50" width="100" alt=”This will be shown if the image does not display.” />
Use the align and valign attributes to place images within your body, tables, or sections.
Below is an example of how to align an image to the right of a paragraph. Here we are going to align the image to the right side of the page.
<p>This is paragraph 1, yes it is...</p>
<img src="sunset.gif" align="right" alt=”This will be shown if the image does not display.” />
The image will appear along the...isn't it?
<p>This is the third paragraph that appears...</p>
Images can be used as a link on a web page. As you can see on many web pages the small images called thumbnails are used for image links. In this process image or the thumbnail is placed in an anchor tag. For example
<a href="http://www.espn.com" target="_blank"> <img src="myPic.gif"> </a>