How to use an image as a link in HTML/XHTML

The code below shows you how to use an image as a link in HTML/XHTML.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>Web Development Tutorials.com</title>
</head>
<body>
<p>
<a href="http://webdevelopmenttutorials.com/">
<img src="imagewebdevelopmenttutorials1w244h33.jpg" border="0" width="244" height="33" atl="some text" />
</a>
</p>
</body>
</html>

The code above creates the image below which is used as a hyperlink.

You can use the following image file to practice using an image a a hyperlink: imagewebdevelopmenttutorials1w244h33.jpg

Use the text editor below to practice what you have learned.

You can use the image file "imagewebdevelopmenttutorials1w244h33.jpg" to practice inserting an image into a web page.

Free Website Templates

Free Web Tools

Recommended Websites