HTML - href (hypertext reference) attribute

About

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 creates a reference relationship.

Metadata

In dublin core metadata, the reference (ie the value of href) is stored in the References filed

Special # value

The empty fragment value #:

  • points to the top of the current page
  • cause local scrolling to the top of the page but will never navigate (ie perform a http get request).
  • is misused by programmers when the href value is determined programmatically in Javascript. See programmatic_href

Programmatic href

If you need to determine the href value programmatically, do it on the server and if you can't.

  • unset the href attribute
  • and set the cursor style to pointer to still advertise that there is a link. Example
#your-link-id {
  "cursor":"pointer"
}





Discover More
Data System Architecture
Data Modeling - Reference (connect, link to)

Reference is the name of a relationship that is directed where an entity (source, first) refers to another entity (target, second) We say that the source entity references, cites, or otherwise points...
HTML - A element (anchor)

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) the...
HTML - Hyper(Link) (href elements)

A link in HTML is an element that have the href attributes with an URL value An hyperlink is a contraction of hypertext link. link element The following elements are hyperlink because they have the...
Pingback

pingback is a feature that permits to notify back automatically a website owner when an article is talking another article. In the original article html document, the website owner advertise the...
Google Search Console Links
Search Engine - Backlink (Internal / External Link)

A backlink is a link that points to a page. Technically, it means that the href attribute of the link has the same value than the url of the page. backlinks are important for search engine optimization...
URI - Fragment (Ref, Reference)

The fragment is the last part of a URI An URI has the following syntax with the #fragment being the fragment The value of the fragment must be encoded. The fragment will cause the browser to scroll...



Share this page:
Follow us:
Task Runner