Topics:
» ASP
» HTML
» Stylesheets
» JavaScript
» PHP
» Flash
» More...

Site:
» Forum
» About

HTML Images

Images can be embedded in a page using only one tag. There are examples of images on this page - the top header secton contains 3 images.

The basic syntax is:

<img src="location.gif" width="300" height="100" border="0" alt="Description text">

For a basic image tag all you need is <img src="location.gif">. If you do this the image will display at its normal size although it is always a good idea to add a width and height tag.

The alt proerty defines the text that is displayed when a user hovers over an image or when the image is missing, it is displayed where the image should be. For example:

<img src="fakelocation.gif" width="200" height="100" alt="Here is an example">

Would produce:

Here is an example

To add a link round an image simply do it like a normal hyperlink

<a href="targetpage.html"><img src="location.gif" border="0></a>