HTML Text Links / HTML Links ?

A webpage can hold many links that take you openly to other web pages and even specific elements of a given page. These links are called as hyperlinks.

Hyperlinks help visitors to navigate between the websites by clicking on words, images, and phrases. Thus you can generate hyperlinks using the text or images available on a webpage.

Linking Documents

The linking documents play an essential role in an HTML program. A link is stated using HTML tag <a>. This tag is known as anchor tag and anything between the starting <a> tag and the closing </a> tag becomes an element of the link.  You can use the below code to make hyperlink from one page to another page.

<a href="http://www.codingtag.com/"> HTML Links </a>

When you click on the text “HTML Links”, then page will be redirected to another page of “http://www.codingtag.com” which you have added in the tag.




HTML text links also have some attributes which specify the exact location of the redirecting page. See below the attributes and their usage:

_blank  – It opens the linked document in a new tab or window.

_self – It opens the linked document in the same frame.

_parent – It opens the linked document in the parent frame.

_top – It opens the linked document in the full body of the window.

Targetframe – It opens the linked document in a named targetframe.


Change Color of Hyper Links through Style sheet:

<html>
<head>
<style>
a:visited {
color: blue;
}
a:hover {
color: green;
}
a:active {
color: yellow;
}
</style>
</head>
<body>

<div>You can change the colors through internal stylesheet</div>

<a href="html_images.asp" target="_blank">HTML Images</a>

</body>
</html>

Coding Tag

Coding Tag always happy to serve you in Information Technology (IT). Learn HTML, CSS, Javascript, PHP, Android, Digital Marketing, Latest IT News and many more.

Leave a Reply

avatar
  Subscribe  
Notify of