Write HTML code to demonstrate the use of Anchor Tag for the Following:-

  1. Create a web link that opens in a new window.
  2. Create a web link that opens in the same window.
  3. Reference to some image.
  4. Making an image a hyperlink to display second image.

<!DOCTYPE html>

<html>

<head>

      <title>M2-R5.1 Set 1 Question 2</title>

</head>

<body>

            <h1><a href=”https://nielitexam.co.in” target=”_blank”>O level Test Site</a></h1><br>

            <h1><a href=”https://www.olevelnotes.com” target=”_self”>O level Notes Site</a></h1><br>

            <h1><a href=”#img”>Goto Image Area</a></h1><br>

            <h1><a href=”image/notes logo.png”><img src=”image/small.jpg”></a></h1><br>

 

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

 

<hr color=red size=5>

<hr color=green size=5>

<h2 align=”center”><a name=”img”>Welcome to Image World</h3>

<hr color=green size=5>

<hr color=red size=5>

<img src=”image/Calc.png” height=”450″>

<img src=”image/HTML 5.png” height=”450″>

</body>

</html>