Anchor Tag

Posted by Kalyan Kurasala  |  No comments

Anchor Element: The Anchor element is the most important element in HTML. This element makes the text as a Hyperlink. Links are inserted using <A> tag. The Anchor element has attributes namely,
  • HREF Attribute: The HREF attribute is used to specifying about a text or an image as a Hyperlink. HREF stands for Hypertext Reference. For example,
<A HREF=”File:\\D:\My College.doc”>About My College</A>
Here the text “About My College” refers Hypertext. The document “My College.doc” is opened in web browser when this Hypertext is clicked.

  • NAME Attribute: The NAME attribute is used to link a specific section within the web page or when a text is to be referred by another document by adding the # identifier.
Simply if we click on HREF link then it opens another web page. But if we click on name link then it takes us to the target which location in same page.

<A HREF=#About HTML”>Introduction to HTML</A>
<A NAME=”About HTML”>What is HTML</A>
  • TITLE Attribute: The TITLE attribute is used along with the Anchor element to display a note when the mouse cursor is place over Hyperlink.
<A TITLE=History HREF=”My College.doc>College</A>
Setting the Colors for Hyperlinks: These are attributes that are used for changing the default color of the Hyperlinks namely, are:
  • Link Attribute: The LINK attribute is used for changing the default color of the hyperlink. This attribute is specified within the body element.
<BODY Link=”Yellow”>
<A HREF=”My College.jpg”>College</A></BODY>
Specifying the LINK attribute as Red displays the College in RED Color.
  • ALINK Attribute: ALINK stands for Active Link. You can change the color of the Active Lik using the Alink attribute.
<BODY Alink=”Yellow”>
<A HREF=”My College.jpg”>College</A>
</BODY>
When the Hyperlink is clicked, then it is activated. Such Links are called Active Links.
  • VLINK Attribute: VLINK stands for Visited Link. You can change the color of the Visited Hyperlink using the VLINK attribute.
<BODY Vlink=”Orange”>
<A HREF=”My College.jpg”>College</A>
</BODY>
Hyperlinks that have already been clicked called Visited Links.

08:23 Share:
About Kalyan Kurasala

I am a B.Tech Student at Prasiddha College Of Engineering and Technology in Anathavaram.

0 comments:

Get updates in your email box
Complete the form below, and we'll send you the best coupons.

Deliver via FeedBurner
back to top