HTML Linking document

In HTML you can link to another page using anchor tag. Anchor tag is mentioned by <a> </a> .

  • By default anchor tag will display with "blue color and underlined text" format when it is unvisited link. 
  • Once it is clicked/visited it changed to "purple color and underlined text" format. 
  • When it is active it will display with "red color and underlined text" format.

                        The most important attribute of the <a> element is "href" (hyper reference) attribute which indicates the destination file and its location.
  
                      Another attribute is "target" which indicates where to open destination file in the browser. Values like "_blank" used to open file in new tab and "_self" used to open file in same tab of browser.


Example :
         <a href="http://webdesignguilders.blogspot.in/p/html.html">Visit HTML Page</a>

             You can link to an image for a text in href attribute to open it in same tab or another tab.

        <a href="html_link.jpg" target="_blank">HTML Link</a>



No comments:
Write comments