Page 127 - iPlus_Ver_2.0_class_7
P. 127

The <A> tag has the following attributes:

                 •  HREF: HREF stands for Hypertext Reference. When we create external linking, it takes the URL
                   of the web page that we want to link to.
                 •  NAME: This attribute takes the section name of the web page as its value when we create
                   internal linking.

                 •  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: It opens the linked web page in a new window or tab of the web browser.

                      ◦ parent: It opens the linked web page in a parent window or tab of the web browser.
                      ◦ self: It opens the linked web page in the current window or tab.
                      ◦ top: It 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.

                 Some attributes used within the <BODY> tag to define the default colours for link, visited link,
                 and active link on a web page are as follows:
                 •  VLINK: This attribute is used to set the colour of the visited links.
                 •  LINK: This attribute is used to set the colour of the links.

                 •  ALINK: This attribute is used to set the colour of the active link.
                 External web pages can be linked using the href attribute of the anchor tag. The href attribute
                 takes the URL of the web page in double-quotes.

                 The first page of a website, also known as the Home
                 page, contains various links to 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 below:
                 The 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>

                 <TITLE> Home Page </TITLE>
                 </HEAD>
                 <BODY BGCOLOR="#EEFFEE" TEXT="red">
                 <H1> ABC Public School </H1>

                 <HR COLOR="red">
                 <MARQUEE> <H3> Welcome to ABC Public School </H3> </MARQUEE>

                 <FONT SIZE="5">
                 <BR> <A HREF="Admissions.html"> Admissions </A>


                                                                                                                 125
                                                                                                More on HTML
   122   123   124   125   126   127   128   129   130   131   132