Why is linking between Web pages required?

Q5. Why is linking between Web pages required? Explain with an example.  

Ans. Links are required to connect one Web page to another. When a user clicks a link, he or she is redirected (sent) to the Web page specified as the destination Web page for the link. Let’s understand how two Web pages are linked together through the following code:

The source code of HTML_Doc.html is shown as follows:

<HTML>

<HEAD>

<TITLE>

Linking Web pages

</TITLE>

</HEAD>

<BODY BGCOLOR=”pink”>

<BR>

<A HREF=”test.html”> Click Here </A>

</BODY>

</HTML>

The source code of test.html is shown as follows:

<HTML>

<HEAD>

<TITLE>

Destination Web page

</TITLE>

</HEAD>

<BODY BGCOLOR=”red”>

<BR> <BR> <BR>

<CENTER>

<IMG SRC=”image.jpeg”>

</CENTER>

</BODY>

</HTML>

The output of HTML_Doc.html is shown in Figure:

Figure: Linking of Web Pages

On clicking the text, you are redirected to the test.html Web page, which is shown in Figure:

Figure: The test.html Web Page

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: