Html Tutorial


What are links?

Links are used to travel from one page to other. Links are very important concepts as it is used in all webpages.
You will get more clear from the examples below.


<a href="link url">I am a link</a>


<a href="">Go to Tutorial Heap</a>


Link colors

As you notice, when you create a link then the color of the link is different and also the text is underlined.

Colors(by default):

  • Unvisited link : Blue
  • Visited link : Purple
  • Active link : Red

  • You can try this, just CLICK THIS link above.

    If you want to customize the colors of link yourself then you can do this with the help of CSS.

    Link Target

    This attribute is used to define where to open the link. i.e in same window or in different window.


    <a href="" target="_self">Open in same window</a><br>
    <a href="" target="_blank">Open in different window</a><br>
    <a href="" target="_parent">Open in parent frame</a><br>
    <a href="" target="_top">Open in full body of window</a><br>


    Try every link to understand how they work.

    Image Links

    You have notice that sometimes when you click to an image on the web you went to another page. This means that there is a link on a image.
    So let's understand how to put link on image.


    <a href=""><img src="images/tutorialheap.png"/></a>


    Try to click on the image above.