We can insert a link in HTML using <a> tag. This tag refers to another page of same domain or other domain. And also it can refer different part of the same page. That is three types of link
Link to an internal anchor
<a href="#contact-me">Contact</a>
Link to local page of the same domain
<a href="../image/img100.jpg">Click me to show Image</a>
Link to a page of the different domain
<a href=http://www.google.com/ >Google</a>
Note : We can change these colors by the <body> attributes link, alink and vlink. Otherwise we can also change it by the CSS.
We can also create a link in a particular area of a image by <map> tag. This called hotspot on image.
The "target" attribute have four values which set where the new linked file open.
target=" |
_blank" |
Opens a new window for the linked page. |
_self" |
Opens the link page in the same window. |
|
_parent" |
Opens the linked page in a superior frame of the link |
|
_top" |
Opens the linked page in the same browser canceling all the frames |
We can easily create feedback email link. Here we create an email link with pre-established subject. It opens the computer default mail application sending address and email subject.
<a href="mailto:tah2016@gmail.com?subject=Feedback"> Feedback </a>
To download any file from the server or anywhere else, we can insert a download link. Just set the downloadable file location to the href attribute of the <a> tag.
<a href="http://www.tah2016.com/ downloadfile.zip"> Download Me </a>