HTML Links

It is a connection from one Web resource to another. The <a> tag is the tag used to create links on a webpage. <a> called a anchor tag.

Attribute of <a> tag:

  • href 

       Denotes the webpage or resource to link to.

Example

       

  • target

       Denotes where a link will open. By default, it will open in the same window, but you can set it to open in a new window         by setting the target attribute to "_blank"

Example.

       

  • title

       Sets a title for the link that will appear in a small box when you move the mouse over the link.

 

Example       

                   <a href="url">text that will be displayed as the link</a>

                   <a href="http://www.codersarts.com" target="_blank">codersarts</a>

                   <a href="http://www.hostforweb.com">

                          Click here to go to HostForWeb web hosting company homepage

                          </a> <br />

                          <a href="http://en.wikipedia.org/wiki/apple" >title="Learn about Apples"> Apples are good! </a>

Type of links:

  • Internal Links

       When you link your pages within your own directory tree limit is called Internal Link.

 

    or

 

  • External Links

       External links which link your pages to other websites.​

Example

       

 

Example 

     

                   <a href="http://www.codersarts.com/html/tables/contact.html">Table Border</a>

                   <a href="tables/border.html">Table Border</a>

 

                   <a href="http://www.w3.org/Help">W3C Help</a>

Conclusion

In this, we have cover hyperlinks which used to connect more than one files or any web links.

Here we have been tried to handle different types of hyperlinks like internal, external, etc.

Powered  by Codersarts