HTML - Hyper(Link) (href elements)

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

See Google Analytics - Outbound Link Tracking

Deep linking





Discover More
HTML - The link element (inter-document relationships)

The link represents metadata that expresses inter-document relationships. hyperlink The link element can be used only within the head element. where: media is a list of media query separated...
Card Puncher Data Processing
UI - Action (Interaction | Event )

event in a graphical user interface (GUI) application Action (or interaction) are the actions that can perform a user (or programmatic client) with the application. The more action, the more engagement....



Share this page:
Follow us:
Task Runner