Horje

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



Single Articles
Full Example of using an Image as a LinkHTML Links


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

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



Share on: