To make an image into a link, simply enclose the <img> tag within the <a> tag.
<a href=”default.asp”> <img src=”smiley.gif” alt=”HTML tutorial” style=”width:42px;height:42px;”> </a> |
To generate a link that opens the user’s email program to compose a new email, include “mailto:” within the href attribute.
<a href=”mailto:[email protected]”>Send email</a> |
JavaScript is used to turn an HTML button into a link by defining actions for events like button clicks.
<button onclick=”document.location=’default.asp'”>HTML Tutorial</button> |