Horje
How to use an Image as a Link | HTML Links Code
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



Read Full::
HTML Links Code
Category:
HTML Code
Sub Category:
HTML Links Code
Uploaded:
7 months ago
Uploaded by:
Admin
Views:
1

Related Articles
What is HTML Links HTML Links Code
How to create HTML Links - Syntax HTML Links Code
How to create HTML Links The target Attribute HTML Links Code
What is Absolute URLs vs. Relative URLs HTML Links Code
How to use an Image as a Link HTML Links Code
How to use Link to an Email Address HTML Links Code
How to create Button as a Link HTML Links Code
How to use a title in Link HTML Links Code

Single Articles
Full Example of using an Image as a Link

Share on: