HTML LINKS Tag

How to create links to different pages in html?
How to use a image as link?

Explanation

Link:
<a> </a>
Lets us consider you have two pages test.html and test1.html.
You want to give a link in test.html so that others can click on it and go to test1.html.
The tag used is "a" with attribute named "href"
Example :
<a href="test1.html"> Click to test1.html </a>
Result :
So the tag should be used as above.
The text in between the tag will be displayed on the page.
On clicking the text the user will be taken to the page defined in the attribute href
Link using Images:

Even images can be used for creating links.
Its simple.
Give the image in between the "a" tags.
Example :
<a href="test1.html"> <img src="./test.jpg"> </a>
Result :
You can see. Its so simple.
In the previous case we gave the text as link.
Now we have given image as a linking code.

Ask Questions

Ask Question