Follow this blog

Wednesday, February 6, 2013

How to make clickable picture in HTML

This short tutorial will learn you how to make a clickable picture in HTML web page.


What is clickable picture?

Clickable picture is picture which will lead you to specific web page when you click on that picture.


To better explain what is clickable picture take a look at image below this text. If you click this image, post "Make clickable links and clickable images" will be opened.

Clickable picture




HTML code for: How to make clickable picture

<a href="URLToLinkedWebPage"><img src="URLImageLocation" /></a>

In HTML code for clickable image you need to replace:

  • URLToLinkedWebPage - with URL to web page you want to be opened when user click on image

  • URLImageLocation - with location of image


Example:

<a href="https://www.google.com"><img src="https://www.google.com/images/srpr/logo3w.png" /></a>

Above HTML code display Google logo ("www.google.com/images/srpr/logo3w.png") and links to "www.google.com" when picture is clicked.


No comments: