Page 78 - Touchpad_Plus_V3.2_Class 8
P. 78
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 syntax to create a hyperlink is:
<A HREF = "URL of Web Page" TARGET="_blank"> Link Text </A>
For example:
<A HREF = "About.html" TARGET="_blank"> About Us </A>
The preceding code creates a link with the text "About Us". When we click on the "About Us" link,
the "About.html" web page will open in a blank tab or window.
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 on which we are using external
linking. The Home page of the website is as shown:
The Home 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:
<!DOCTYPE HTML>
<HTML>
<HEAD>
<TITLE> Home Page </TITLE>
<STYLE>
BODY{BACKGROUND-COLOR:#EEFFEE; COLOR:RED;}
HR{BACKGROUND-COLOR:RED; HEIGHT:2px;}
H3{COLOR:RED; TEXT-ALIGN:CENTER;}
P{FONT-SIZE:20PX;}
</STYLE>
</HEAD>
<BODY>
<H1> ABC Public School </H1>
<HR>
<H3> Welcome to ABC Public School </H3>
<P>
<BR> <A HREF="Admissions.html"> Admissions </A>
<BR> <A HREF="Events.html"> Events </A>
<BR> <A HREF="Sports.html"> Sports </A>
<BR> <A HREF="Activities.html"> Activities </A>
<BR> <A HREF="About.html"> About Us </A>
<BR> <A HREF="Contact.html"> Contact Us </A>
</P>
</BODY>
</HTML>
76 Plus (Ver. 3.2)-VIII

