HTML5 > Elements of HTML

Hyperlink in HTML5

How to display hyperlink in HTML?


Anchor Tag

Anchor tag is an one of the main element in the HTML which is used to create Hyperlinks. 

Hyperlink (also called link) is generally a text that appears as active text, hovering mouse changes mouse icon to hand and clicking this text executes an event. By default this text color is blue with underline style.

CODE  
<a href="http://www.dotnetfunda.com" title="DotNetFunda.com">DotNetFunda.com</a> 

In the above code snippet, "href" stands for 'Hypertext refernce' and "http" stands for 'Hypertext transfer protocol'.

Output

Notice the hyperlink in the above output image. Clicking on the hyperlink sends user to http://www.dotnetfunda.com website in the same tab. If we want to open the target in the new tab we use "target" attribute as below.

<a href="http://www.dotnetfunda.com" target="_blank" title="DotNetFunda.com">DotNetFunda.com</a>  
 Views: 1833 | Post Order: 2



Write for us