HTML Links

Link connects one web source to another it provides a simple mean of navigation from page to page. The connection begins from source to destination.

HTML Link-Hyperlinks

HTML link is known as hyperlink it allows to jump from on page to other. In HTML links are represented using <a> tag.

Note: A link can be an image or any other html element.

Syntax

<a href="url">Text shown to user</a>
  • href attribute: It specifies the destination address of link.
  • Text link: This is visible part of link which is shown to user(Text shown to user).

By clicking on text link user can go to specific address which is given in href attribute.

<a href="https://www.tutorialsart.com/">Visit Tutorials art</a>

HTML Links

Visit tutorialsart.com!

Link Appearance:

  • Unvisited Link: It appears underlined and blue in color.
  • Visited Link: It appears underlined and purple in color.
  • Active Link: It appears underlined and red in color.

The appearance of html links can be changed by using CSS.

	<!DOCTYPE html>
<html>
<head>
<style>
a:link    {
color: pink
}
a:visited 
{
color: yellow
}

a:active  {
color: purple
}
</style>
</head>
<body>

<p>You can change the default colors of links</p>

<a href="https://www.tutorialsart.com/">Visit tutorialsart.com!</a>

</body>
</html>
		
HTML Links