How to use an image as a link in HTML?

HTMLWeb DevelopmentFront End Technology

To use image as a link in HTML, use the <img> tag as well as the <a> tag with the href attribute. The <img> tag is for using an image in a web page and the <a> tag is for adding a link. Under the image tag src attribute, add the URL of the image. With that, also add the height and width.

Example

You can try to run the following code to use an image as a link in HTML

Live Demo

<!DOCTYPE html>
<html>
</html>