Horje
How to use an Image as a Link

To use an image as a link, just put the <img> tag inside the <a> tag:


Full Example of using an Image as a Link

To use an image as a link, just put the <img> tag inside the <a> tag:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Image as a Link</h2>

<p>The image below is a link. Try to click on it.</p>

<a href="default.asp"><img src="https://itupto.com/avatar.png" alt="HTML tutorial" style="width:42px;height:42px;"></a>

</body>
</html>

Output should be:

Full Example of using an Image as a Link





Category:
Web Tutorial
Sub Category:
HTML Links
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference