SQL PHP HTML JavaScript articles and free code
 
 

Images as Hyperlinks

Images can also act as hyperlinks just as normal text. Just as text is made as a hotspot so as an image. i.e, by enclosing the <img> tag wtihin the <a> ... </a> tags.











    Example:
          <a href="targetpg.htm"><img src="target.gif"></a>

       Note: Here the image acts as a hotspot and navigates to the file targetpg.htm
                 Just as an underline appears on the text if we enclose text within <a> ... </a> tags, a border will appear for the image that has been placed with in <a> ... </a> tags. You can remove the border by setting the border attribute of <img> tag to 0.

          <a href="targetpg.htm"><img src="target.gif" border="0"></a>
Discuss this tutorial at forum

List of HTML Tutorials

Links and CSS
Use of Image as Hyperlink
Hyper link in HTML pages
How to Open link in a new window
Opening child window using JavaScript
Linking different areas of a page with back to top: Learn how to develop FAQ page

 

Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.

Scripts
PHP
JavaScript
List of HTML Tutorial
HTML Tags
Color Chart
HTML Calendar
Tags on web page
Web Design
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.