All TalkersCode Topics

Follow TalkersCode On Social Media

devloprr.com - A Social Media Network for developers Join Now ➔

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 ❯