Do you want to be a good Web Developer?

Enter Your Email To Get Our Exclusive Tutorials Right In Your Email

HTML Links

HTML Links


Links are used to go from one page to another.They are also called Hyperlinks.It allows the user to click and then redirect to another page


Example

<a href="page url">Link Name</a>

Code Explanation

  • href:is the destination or URL of the going page
  • Link Name:is the name or visible text

Links are of two type:

  • Absolute Link
  • Relative Link


Absolute Link

Absolute links are the complete web address of the destination page.

<a href="www.somewebsite.com/about.html">About</a>


Relative Link

Relative link(link to a same website) relative address(without http://www....) of the destination page.

<a href="about.html">About</a>


HTML Link Attributes


  • target:it specifies where to open the linked document.

  • <a href="about.html" target="_blank">About</a>

    Target Attribute Values

    • _blank:it opens the linked document in new window or in new tab.
    • _self:it opens the linked document in same frame.
    • _parent:it opens the linked document in parent frame.
    • _top:it opens the linked document in full body of the window.
    • framename:it opens the linked document in that frame.

    PreviousNext

    Join Us With Our 21000+ Subscribers And Get Our Latest Tutorials Update Via Email