HTML: Creating graphical hyperlink

This entry is part 34 of 34 in the series HTML

To create a hyperlink on an image, we place the <img> tag in an <a> tag.

You can refer to an earlier example where we have created a hyperlink to a webpage.

<!DOCTYPE html>
<head lang='en'>     
    <meta charset='UTF-8'>

<a href='' title='Ushuaia'><img src='//'></a>


Just in case that the image is not loaded for some reason, we could put an alternate text on the image.

<img src='//' alt='Ushuaia'>
Series Navigation<< HTML: Image margin