Reference articles on history, science, culture and more
Encyclopedia

Hyperlink

Method of referencing visual computer data

Image credit is listed at the end of this article.

In computing, a hyperlink, or simply a link, is a digital reference providing direct access to data by a user's clicking or tapping. A hyperlink points to a whole document or to a specific element within a document. Hypertext is text with hyperlinks. The text that is linked from is known as anchor text. A software system that is used for viewing and creating hypertext is a hypertext system, and to create a hyperlink is to hyperlink (or simply to link). A user following hyperlinks is said to navigate or browse the hypertext.

The document containing a hyperlink is known as its source document. For example, in content from Wikipedia or Google Search, many words and terms in the text are hyperlinked to definitions of those terms. Hyperlinks are often used to implement reference mechanisms such as tables of contents, footnotes, bibliographies, indexes, and glossaries.

In some hypertext, hyperlinks can be bidirectional: they can be followed in two directions, so both ends act as anchors and as targets. More complex arrangements exist, such as many-to-many links.

The effect of following a hyperlink may vary with the hypertext system and may sometimes depend on the link itself; for instance, on the World Wide Web most hyperlinks cause the target document to replace the document being displayed, but some are marked to cause the target document to open in a new window (or, perhaps, in a new tab). Another possibility is transclusion, for which the link target is a document fragment that replaces the link anchor within the source document. Not only persons browsing the document may follow hyperlinks. These hyperlinks may also be followed automatically by programs. A program that traverses the hypertext, following each hyperlink and gathering all the retrieved documents is known as a Web spider or crawler.

02Uses in various technologies

HTML

Tim Berners-Lee saw the possibility of using hyperlinks to link any information to any other information over the Internet. Hyperlinks were therefore integral to the creation of the World Wide Web. Web pages are written in the hypertext mark-up language HTML.

This is what a hyperlink to the home page of the W3C organization could look like in HTML code:

<a href="https://www.w3.org/">W3C organization website</a>

This HTML code consists of several tags:

  • The hyperlink starts with an anchor opening tag <a, and includes a hyperlink reference href="https://www.w3.org/" to the URL for the page. (The URL is enclosed in quotes.)
  • The URL is followed by >, marking the end of the anchor opening tag.
  • The words that follow identify what is being linked; this is the only part of the code that is ordinarily visible on the screen when the page is rendered, but when the cursor hovers over the link, many browsers display the target URL somewhere on the screen, such as in the lower left-hand corner.
  • Typically these words are underlined and colored (for example, blue for a link that has not yet been visited and purple for a link already visited).
  • The anchor closing tag (</a>) terminates the hyperlink code.
  • The <a> tag can also consist of various attributes such as the "rel" attribute which specifies the relationship between the current document and linked document.

Webgraph is a graph, formed from web pages as vertices and hyperlinks, as directed edges.

XLink

The W3C recommendation called XLink describes hyperlinks that offer a far greater degree of functionality than those offered in HTML. These extended links can be multidirectional, remove linking from, within, and between XML documents. It can also describe simple links, which are unidirectional and therefore offer no more functionality than hyperlinks in HTML.

Permalinks

Permalinks are URLs that are intended to remain unchanged for many years into the future, yielding hyperlinks that are less susceptible to link rot. Permalinks are often rendered simply, that is, as friendly URLs, so as to be easy for people to type and remember. Permalinks are used in order to point and redirect readers to the same Web page, blog post or any online digital media.

The scientific literature is a place where link persistence is crucial to the public knowledge. A 2013 study in BMC Bioinformatics analyzed 15,000 links in abstracts from Thomson Reuters' Web of Science citation index, founding that the median lifespan of Web pages was 9.3 years, and just 62% were archived. The median lifespan of a Web page constitutes high-degree variable, but its order of magnitude usually is of some months.

File based hyperlinks

Internet shortcut (.url) file

An Internet shortcut file, also known as the URL file format, has the file extension .url (possibly hidden by default in the graphical user interface), and is the file format in Windows systems used for hyperlinks to the Internet.

Internet shortcuts are text files, but their internal structure is similar to that of an INI file. Opening them in the graphical file browser of Windows or macOS (but not Linux) will open the link in the default web browser. Internet shortcut files can be easily made by hand, as the minimum features needed to operate as a hyperlink are simply the [InternetShortcut] header and the URL= key-value pair. Other key-value pairs are irregularly supported across operating systems. An example of a valid Windows Internet Shortcut with some specialized key-value pairs is shown below:

[InternetShortcut] URL=https://www.wikipedia.org/ WorkingDirectory=C:\WINDOWS ShowCommand=7 IconIndex=1 IconFile=C:\WINDOWS\SYSTEM\url.dll Modified=20F06BA06D07BD014D HotKey=1601

macOS .webloc file

On macOS systems, the specialized file format for file based hyperlinks is the .webloc file. It uses XML Property list syntax:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>URL</key> <string>https://www.wikipedia.org/</string> </dict> </plist>

Linux Freedesktop.org .desktop file

A file based hyperlink under Unix/Linux with a desktop environment is stored in a .desktop file. It is only supported under Linux. It is a text file with a syntax highly similar to the Windows URL file described above. An example of a valid Freedesktop.org .desktop file is shown below:

[Desktop Entry] Encoding=UTF-8 Type=Link Name=Wikipedia URL=https://www.wikipedia.org/

link.html file

A Windows, macOS, and Linux cross-platform file based hyperlink can be implemented with an unofficial link.html style file:

<!DOCTYPE html><html lang="en"> <!-- Example of a link.html file: i.e. a file based hyperlink that works cross-platform on Windows, macOS, and Linux. --> <head> <meta http-equiv="refresh" content="0; url=https://www.wikipedia.org" /> <title>Redirecting to https://www.wikipedia.org ...</title> </head> <body> Loading <a href="https://www.wikipedia.org">https://www.wikipedia.org</a> ... </body> </html>

04History

The term "link" was coined in 1965 (or possibly 1964) by Ted Nelson at the start of Project Xanadu. Nelson had been inspired by "As We May Think", a popular 1945 essay by Vannevar Bush. In the essay, Bush described a microfilm-based machine (the Memex) in which one could link any two pages of information into a "trail" of related information, and then scroll back and forth among pages in a trail as if they were on a single microfilm reel.

In a series of books and articles published from 1964 through 1980, Nelson transposed Bush's concept of automated cross-referencing into the computer context, made it applicable to specific text strings rather than whole pages, generalized it from a local desk-sized machine to a theoretical proprietary worldwide computer network, and advocated the creation of such a network. Though Nelson's Xanadu Corporation was eventually funded by Autodesk in the 1980s, it never created this proprietary public-access network. Meanwhile, working independently, a team led by Douglas Engelbart (with Jeff Rulifson as chief programmer) was the first to implement the hyperlink concept for scrolling within a single document (1966), and soon after for connecting between paragraphs within separate documents (1968), with NLS. Ben Shneiderman working with graduate student Dan Ostroff designed and implemented the highlighted link in the HyperTIES system in 1983. HyperTIES was used to produce the world's first electronic journal, the July 1988 Communications of the ACM, which was cited as the source for the link concept in Tim Berners-Lee's Spring 1989 manifesto for the Web. In 1988, Ben Shneiderman and Greg Kearsley used HyperTIES to publish "Hypertext Hands-On!", the world's first electronic book.

Released in 1987 for the Apple Macintosh, the database program HyperCard allowed for hyperlinking between various pages within a document, as well as to other documents and separate applications on the same computer. In 1990, Windows Help, which was introduced with Microsoft Windows 3.0, had widespread use of hyperlinks to link different pages in a single help file together; in addition, it had a visually different kind of hyperlink that caused a popup help message to appear when clicked, usually to give definitions of terms introduced on the help page. The first widely used open protocol that included hyperlinks from any Internet site to any other Internet site was the Gopher protocol from 1991. It was soon eclipsed by HTML after the 1993 release of the Mosaic browser (which could handle Gopher links as well as HTML links). HTML's advantage was the ability to mix graphics, text, and hyperlinks, unlike Gopher, which just had menu-structured text and hyperlinks.

Watch videos about HyperlinkExplainers and documentaries on YouTube (opens in a new tab)

Sources and credits

This article is adapted from the Wikipedia article Hyperlink, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.

Images, from Wikimedia Commons:

Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.