Image as link

Links do not have to be texts. It is very common to use images as links.As we explained, the visible part of our links is placed between the <a> and </a> tags. Thus our syntax would be like:

<a href = "anotherPage.html" target="_blank">
     <img src = "imagesFiles/myphoto.png" alt = "This is a photo" title = "Click to visit the ....">
</a>

Note

You may have notice that we use href for links and src for media. These attributes may look similar, however the browser understand them very different.

When the browser loads a page, the process of loading is paused until all the src files have been executed (e.g. all images have been loaded).In contrast, the process of loading is not paused for href attributes.