HTML link tag, creating links in html, non text anchors, link attribute, alink attribute, vlink attribute, example for links, vitamins.html, proteins.html,
2. Creating links in html
• Links can be created using the <A> …. </A> tag.
• <A> tag is otherwise called as Anchor tag.
• To specify the name of the file to be linked,
HREF (Hypertext REFerence) attribute is used
along with this tag.
• The Anchor tag should be followed by a text
which will be displayed as a link.
• This text is displayed in blue colour along with
underline.
• When the mouse cursor is placed on this link, it
changes into a hand symbol.
3. Non Text Anchors
• When an anchor tag is given followed by
an image instead of text then it is non –
text anchors.
Eg., <A HREF = “Click to www.yahoo.com”>
<img src = “C:/Windows/puppies.gif”></A>
4. Link attribute
• This attribute is used to change the colour
of the link which is by default in blue.
• This attribute is used with <body> tag.
Eg., <body link = “yellow”>
5. ALINK attribute
• This attribute stands for Active link.
• A link is said to be an active link when it is being
clicked on by the mouse.
• This attribute is also used along with <body>
tag.
• Eg., <body alink = “orange”>
6. VLINK attribute
• This attribute stands for visited link.
• A link is said to be a visited link, if it had
already been viewed by the user.
• This attribute is used along with <body>
tag.
• By default, the VLINK colour is purple.
• Eg., <body vlink = “red”>
7. Example for links
(vegetables.html)
<HTML>
<HEAD>
<TITLE> Vegetables </TITLE>
</HEAD>
<BODY LINK = “Green” vlink = “RED”>
<H3> welcome to the world of vegetables</H3><br>
<P> Vegetables are used as a basic food items in
today’s world. They are rich in proteins and minerals so it is
necessary that we use a lot of vegetables in our daily life. </P>
<A href = “vitamins.html”> click here to know about
vegetables full of vitamins. <BR>
<A href = “Proteins.html”> click here to know about
vegetables full of proteins.
</BODY>
</HTML>
8. vitamins.html
<HTML>
<HEAD>
<TITLE> vitamins </TITLE>
</HEAD>
<BODY>
<H3> welcome to the world of vitamins</H3><br>
<P> Vitamins are needed for good eye sight and strength. The
vegetables that are rich in vitamins are as follows: </P>
<UL>
<LI Type = “square”> Carrot
<LI Type = “square”> Beetroot
</UL>
<A href = “vegetables.html”> <img src = “home.bmp” align =
“right”>
</A>
</BODY>
</HTML>
9. proteins.html
<HTML>
<HEAD>
<TITLE> proteins </TITLE>
</HEAD>
<BODY>
<H3> welcome to the world of proteins</H3><br>
<P> proteins are needed for growth and strength. The
vegetables that are rich in proteins are as follows: </P>
<UL>
<LI Type = “square”> potato
<LI Type = “square”> cereals
</UL>
<A href = “vegetables.html”> <img src = “home.bmp” align =
“right”>
</A>
</BODY>
</HTML>