HTML Image Link

Using Images as Links in HTML

Well, just like we can use buttons as links, we can also use the images as links. We have to do the same thing, just to write the image inside the tag. Here is the code for using images as links →

<!DOCTYPE html>
<html lang=”en”>
<meta charset=”UTF-8″>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Understanding links</title>
<h1>Find the button below</h1>
<a href=””><img src=”logo.png” alt=”GyaniPandit logo”></a>

Now, we are just expecting an image on the web page, clicking on which, we can move

Now, if we click on the GyaniPandit logo, we can see that we go to GyaniPandit. So, this way, we can have the images as links.