Horje
How to create HTML Image as a Link

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


Full Example of HTML Image as a Link

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 is a link. You can 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 HTML Image as a Link





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


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