put link in one image to be redirected to another site

1

So I have an image, I wanted the user to be redirected to the link I defined,

<a href="www.google.com"><img src="img/css3.png" class="media-object  img-responsive img-thumbnail"></a>

But when I click on the image it appears not found page

    
asked by anonymous 13.01.2017 / 01:00

2 answers

2

within your href= put http://www..... or just //www....

    
13.01.2017 / 01:08
3

The href parameter of the to tag accepts both relative and absolute links.

From the way it was put in your example, the link is understood as relative, so it will re-add the user to:

www.seusite.com/suapagina/www.google.com

In order for the link to be absolute, use // at the beginning, that is:

<a href="//www.google.com"><img src="img/css3.png" class="media-object  img-responsive img-thumbnail"></a>

More information on documentation .

    
13.01.2017 / 01:11