How to work with HTML Links
Here we will discuss about the hyperlink available in HTML.
Links are also called hyperlink. A hyperlink is link on which when we click we navigate to another page . When we take the mouse over the link the arrow shape turn into hand shape. Links are used using <a> tag. If we want to move from our page to Google page then we have to specify the following HTML code.
<html>
<head>
<title></title>
</head>
<body>
<a href="http://www.google.co.in/">Google</a>
</body>
</html>
|
Output
Google
When we will click on this link It will navigate to Google website. Here an underline is automatically coming on the Google word. This means that it has become a link to navigate to somewhere else.
We can also provide hyperlink to image as well. This means that we can apply hyperlink to image as well.
HTML code:
<html>
<head>
<title></title>
</head>
<body>
<a href="http://www.google.co.in/">
<img src="Chrysanthemum.jpg" style="height: 137px; width: 251px"></img></a>
</body>
</html>
|
Ouput
Here when we click on this image we will navigate to Google page.
Ask Your Question
Got a programming related question? You may want to post your question here