Anchors in HTML

What Are Anchors in HTML?

The a (aka anchor) HTML element represents a hyperlink to a web resource (a page, a file, an email, etc.).

The actual hyperlink is placed in the href (which stands for hypertext reference) attribute of the anchor element. The hyperlink label is placed between the anchor tags.

<a href="">
  The best source of IT Tutorials - soundof.IT

The href can point not only to pages or files but also to emails (mailto:), phone numbers (tel:) and page sections (#).

Anchor Specific Attributes

The anchor element can be configured with several specific attributes. The most notable of them are:

  • download - indicates to the user agent to download the linked resource instead of displaying it,

  • hreflang - indicates the linked resource language,

  • target - indicates where to display the linked resource (use _blank to open in a new tab),

  • rel - indicates the relationship or relationships with the linked resource (e.g. nofollow, author, license, alternate, next, prev, first, last, external).

We use cookies and similar technologies to enhance the quality of services, maintain statistics and adjust marketing content. You will find more information in the Cookies Policy.

By clicking OK you grant consent to processing of your personal data by us and our Trusted Partners with the purpose of maintain statistics and adjustment of the marketing content pursuant to the Privacy Policy. If you wish to not grant that consent and/or limit its extent click Settings.