HTML Links

It consist of anchor element which is used to create a link between a source anchor and destination anchor. The anchor tag can be embedded between text, image, video or button.

HTML Links Syntax:

Example: <a href=”https://www.tutorialandexample.com”>Tutorial for Html</a>

Here, <a>: Anchor tag which add the link to any reference text, image etc.

href (hypertext reference): It specify the destination for the anchor tag.

  • Local Links: It is specified with a relative URL. E.g. html_tutorials.php
  • Global Links: It is an absolute URL (Full website address). E.g. www.tutorialandexample.com

HTML Link Colors

Color of the link is distributed into three category of type of links:

  • Unvisited Link: Link is not visited even once i.e. first time color of a link.
  • Visited Link: When Unvisited link reaches the destination i.e. color of a link changes if visited
  • Active Link: Link color on click that shows link is working.

LINK USAGE

    • Text as Link: <a href =”tutorialandexample.com/html”>Html Tutorial</a>

Output:

    • Image as Link: <a href =”tutorialandexample.com/html”> <img src=”/image/logo.png” alt= “tutotrialandexample”></a>

Output:

    • Email tag: <a href =”mailto: hr@tutorialandexample.com”> Send Mail </a>

Output:

For Prev :