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
Browser
Browser - Document variable (DOM) - Javascript

In a browser, the document is: a DOM document (in-memory tree) of a XML document (generally a HTML dom document) The document is provided by the browser via its DOM webapi (Not by the Javascript...
Google Analytics Outbound Amazon
Google Analytics - Outbound Link Tracking

hyperlink tracking with Based on the Capture outbound links documentation, this site capture all external link created with a anchor with...
HTML - A element (anchor)

HTML The a (or anchor) is a html element that represents a hyperlink. It is the cornerstone: of every navigation scheme on the web. and of the importance of a page on the internet (pagerank) ...
HTML - (Area Element|Image-map hyperlink)

The areaarea element is image-map hyperlink
HTML - Base ( URL ) element (to resolve relative one)

The basebase element specifies a document-wide base URL for the purposes of resolving relative URLs, and a document-wide default browsing context name for the purposes of following hyperlinks.
HTML - Document

An HTML document is a well-formed HTML string (ie that contains the html root element). web page The HTML textual representation can be stored: in a string in a file or in the body of an HTTP...
HTML - Hypertext

Hypertext is: a text that is interactive with its hyperlinks (hypertext links) Hypertext means text with links in it. This is the first basic data structure of Internet as you can find it in:...
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...
HTML - href (hypertext reference) attribute

href stands for hypertext reference. It forces the user agent (browser) to navigate to the resources by performing an Hypertext fetch All elements that have an href attributes are called hyperlink and...
Domtree
How is the DOM document build from an HTML document ?

This page is about the construction of the DOM document from a HTML document (ie the XML language is xhtml) HTMLAPIHTML The HTML dom document is created: * by an xml library * or by the browser...



Share this page:
Follow us:
Task Runner