Anchor tag in html

A link is connection from one web resource to another.

Now make two web pages name them page1.html and page2.html and link them as:

page1.html

<html>
<head><title>Page 1</title></head>
<body>
Hi this is page1. I can access page 2 by clicking this link. <a href="page2.html">

 page2</a>

</body>
</html>

page2.html

<html>
<head><title>Page 1</title></head>
<body>
Hi this is page 2. I can access page 1 by clicking this link. <a href="page1.html">

 page1</a>

</body>
</html>

 

Note href attribute takes path of web page. if pages are in same directory then write only name of web page with extension.

If pages are in different directories or on different servers then give full path. for example we want to go on google then write as

<html>
<head><title>Page 1</title></head>
<body>
Make search on <a href="http://google.com">Google</a>

</body>
</html>