Home Top Ad

HTML : Using an Image as a Link

Share:

To use an image as a link, you will have to use two things :
  1. How to create a link.
  2. How to add an image to the page.

Well, first, you must create a link to the place you want people to go when they click on the picture. So, if you wanted to link to our main page, you would go ahead and type the opening link tag, like this:

<a href="http://www.pageresource.com">

Now, don't type any text, and don't close the tag just yet. What we are going to do is place the image tag right after the opening link tag. The image we are using here is "next.jpg". So, you would type the following:

<a href="http://www.pageresource.com">
<img src="next.jpg" />

OK, now we are going to close the link tag at the end of the image tag, so that the image tag is between the opening and closing link tags, like this:

<a href="http://www.pageresource.com">
<img src="next.jpg" />
</a>

Now that the image is between the link tags, it will operate the same way as a normal link, but now it is a visual image.

Aucun commentaire