HTML - Hyper(Link) (href elements)

About

A link in HTML is an element that have the href attributes with an URL value

An hyperlink is a contraction of hypertext link.

Not to confound with the link element

Element

The following elements are hyperlink because they have the href attribute

Rel Attribute

  • rel=“sponsored”: identify links that were created as part of advertisements, sponsorships or other compensation agreements.
  • rel=“ugc” where UGC stands for User Generated Content and tag user generated content, such as comments and forum posts.
  • rel=“nofollow” no endorsement, including passing along ranking credit to another page. Robot - Follow / NoFollow instruction

More Evolving “nofollow” – new ways to identify the nature of links

Security

  • rel=”noopener” prevents a new tab from taking advantage of the window.opener feature.
  • rel=”noreferrer” prevents passing on the referrer information to the new tab.

Anchor

See Anchorjs

Javascript

The document property document.links returns an HTMLCollection of the a and area elements in the Document that have href attributes.

Spa

In a single page application, use the history api otherwise Google may not find the link

Tracking

Deep linking


Powered by ComboStrap