Page 60 - Modular_V1.1_Flipbook
P. 60
Anchor Tag
Anchor tag is used for creating hyperlinks in HTML web pages. It is a container tag and used
as <A> Hyperlink Text </A>. Where, Hyperlink Text is a text or an image. The <A> tag has the
following attributes:
HREF: HREF stands for Hypertext Reference. It takes the URL of the web page which we
want to link when we create external linking.
NAME: This attribute takes the section name of the web page as its value when we create
internal linking.
VLINK: This attribute is used to set the color of the visited links.
LINK: This attribute is used to set the color of the links.
ALINK: This attribute is used to set the color of the active link.
TARGET: This attribute is used to specify the place in which the linked web page will open.
It takes any one of the following four values:
• blank: Opens the linked web page in a new window or tab of the web browser.
• parent: Opens the linked web page in a parent window or tab of the web browser.
• self: Opens the linked web page in current window or tab.
• top: Opens the linked web page in the window that is on top in all the windows.
TITLE: This attribute is used to define the title of a link, which appears to the user as a
tooltip.
External web pages can be linked using HREF attribute of the anchor tag. The HREF attribute
takes the URL of the web page in double quotes.
First page of a website, also known as Home page contains various links of other web pages. Let
us take an example of a website of the ABC Public School in which we are using external linking.
The Home page of the website is as shown:
Output
Preceding web page contains six hyperlinks Admissions, Events, Sports, Activities, About Us and
Contact Us which are created by using the <A> tag. The code to create the Home.html web page
is as follows:
<HTML>
<HEAD>
58 Touchpad MODULAR (Version 1.1)-IX

