Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     

Anchor tag

Anchor tag is used for create link or create mail link. you have seen email text on many website. when we will click on those, new window of outlook explore will open for send mail. For that we will write a line of code.

Anchor tag denotes with


It is used for link to sites or creates the hyperlinks to specific pages. We can give the link on same page. This also use for send mail to specific mail account.

<a> href="" target=_blank> </a>

Note : _blank is used if we want to open a new window on click of link. If we dont want to open a new window and want to open link in same window then we need not to write target=_blank

We can use in another way also. If page is very big in length. Then we can give the link for reach at specified link on same page. You can see this example on any websites where at the end of the page you will see the link of "Top" or icon where after clicking on that link user may go on top of page.

If target is on same page the we will give the name of anchor tag

target url may be Jump to the Useful Tips Section

<a href="#tips">Jump to the Useful Tips Section</a>

Mail send with anchor tag

<a href=""> </a>

Setting colors of hyperlinks on the page

There are many properties which can be used with body tags. With these properties we can manage the colors of hyperlinks.


  <body link=red vlink=blue alink=gray>

With this tag we will show the links color asblue and visited links color will be gray. We can decorate links with stylesheets.We will read these later in CSS section.

Share this article   |    Print    |    Article read by 5304 times
Rohit kakria
I am software developer, moderator of
Related Articles: No related article
Related Interview Questions: No related interview question