elibraryportal Logo

HTML Anchor or Links Tag

HTML links are hyperlinks. Links allow users to click their way from page to page.

The HTML Anchor tag defines a links one page to another page. The "href" attribute is the most important attribute of the HTML a tag.

A links is an element, a text, or an image that you can click on, and jump to another document.

Syntax - HTML Links

Example:

Output:-

Anchor Tag Example in Html

The href attribute defines the destination address (http://elibraryportal.com/)

The link text is the visible part (HTML tutorial).

HTML Anchor Tag Colors and Icons

⟼ An unvisited link is displayed underlined and blue.

⟼ A visited link displayed underlined and purple.

⟼ An active link is underlined and red.

HTML Links -The target Attribute

The target attribute defines where to open the linked document.

Target Value Description
_blank Opens the linked document in a new tab or window
_self Opens the same tab or windows (this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in a named frame

Example:

Output:-

Anchor Tag Example in Html