HTML Hyperlink

Hyperlink is a pointer from one HTML document to another one, the target may be same website location or some other location on the Internet. It's convenient for users to click their way from page to page.

An HTML Link tag starts from < a > and end with < /a > tag, everything between these two will work as a link.

html-link

What is an HTML link ?

<a href="www.mywebsite.com/about.html">About</a>

In the above code we specify the target URL in "href" , href stands for Hypertext Reference . Href="www.mywebsite.com/about.html" that means, when you click on the link, it will go to website www.mywebsite.com and display the page about.html.

<html> <body> <a href="www.mywebsite.com/about.html">About</a> </body> </html>

When we run this code in a web browser, we can see the text "About" in a blue color and underlined. When you move the cursor over a link the default arrow cursor will turn into a little hand.

We can create a link to another document, by using the href attribute, as well as to create a bookmark inside the same document, by using the name attribute.