Images Inside Links

In honor of Batya

Let's say you want to wrap a link around an image. You need to be able to spot image code. Look for the <img, the code that will start an image.

As an example, let's return to our garlic:
<img src="" alt="garlic" >

You see the image begins with < and ends with >.

So now that you've discovered the image code, wrap it in an anchor tag. The start of the anchor tag will be this:
<a href="

After you type or copy and paste that piece, you then need to paste the url of the place were you want to go. Let's say you want to go to Batya's blog. So here's the next piece of code(make sure your URL starts with http://):
<a href="

Now you need to add a " and a >:
<a href="">

That's the whole left side of the link. The next part of the code should be the image tag itself, so your code thus far will look like this:
<a href=""><img src="" alt="garlic" >

You are almost done. At the other side of the > you need to close the anchor tag with </a>.

Our whole code looks like this:
<a href=""><img src="" alt="garlic" ></a>

The result:

Feel free to ask questions. I'll try to come up with answers that helps you understand.

 About image code
 How to do a link

Share:Tweet about this on TwitterPin on PinterestShare on FacebookShare on Google+

22 thoughts on “Images Inside Links

Please write a comment! I love to hear from you.

Your email address will not be published. Required fields are marked *