HOW TO ADD AN <A HREF> LINK TO A <DIV> CONTROL IN HTML?

F Scott Fitzgerald

Total Post:29

Points:203
Posted by  F Scott Fitzgerald
HTML5 
 1928  View(s)
Ratings:
Rate this:

I need to know how to add an a href link to a div?

Here is my code :-

<div id="buttonOne">
            <div id="linkedinB">
                <img src="img/linkedinB.png" width="40" height="40">
            </div>
      </div>
  1. C G E Mannerheim

    Post:29

    Points:203
    Re: How to add an <a href> link to a <div> control in HTML?

    Can't you surround it with an a tag?

      <a href="#"><div id="btnOne">
            <div id="linkedinB">
                <img src="img/xyz.png" width="35" height="35">
            </div>
      </div></a>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!