Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to make <img> with clickable link?

I would like to make logo of website clickable to index.html, but whole div is the link. I need only clickable picture.

Here is snippet of my code:

<div class="left_header">
    <a href="../index.html">
        <img src="../../images/logo.svg" class="logo" alt="logo">
    </a>
</div>

I tried different ways to solve this problem but it doesn’t work for me.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Try this example working good.

<!DOCTYPE html>
<html>
<head>
   <title>HTML Image as link</title>
</head>
<body>
   <div class="left_header">
       <a href="https://www.qries.com/">
           <img src="https://www.qries.com/images/banner_logo.png" class="logo" alt="logo">
       </a>
   </div>
</body>
</html>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading