How to add an <a href> link to a <div> control in HTML?

Total Post:28

Points:196
HTML5 
 2359  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. Post:28

    Points:196
    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>

      Modified On Mar-31-2018 06:22:13 AM

Answer