A hyperlink, or simply a link, is a reference in a hypertext document to another document or other resource. As such it is similar to a citation in literature. Combined with a data network and suitable access protocol, a computer can be instructed to fetch the resource referenced.
There are a number of ways to format and present hyperlinks on a web page. An embedded link is the most common form a link takes.
Tim Berners-Lee saw the possibility of using hyperlinks to link every unit of information to any other unit of information over the Internet. Hyperlinks were therefore integral to the creation of the World Wide Web.
Links are specified in HTML using the <a> (anchor) elements.
Hyperlinks are used in PDF documents, word processing documents, and spreadsheets among many others.
A link has two ends, called anchors, and a direction. The link starts at the source anchor and points to the destination anchor. However, the term link is often used for the source anchor, while the destination anchor is called the link target.
The most common link target is a URL used in the World Wide Web. This can refer to a document, e.g. a webpage, or other resource, or to a position in a webpage. The latter is achieved by means of a HTML element with a "name" or "id" attribute at that position of the HTML document. The URL of the position is the URL of the webpage with "#attribute name" appended.
Link behaviour in web browsers
A web browser usually displays a hyperlink in some distinguishing way, e.g. in a different colour, font or style. The behaviour and style of links can be specified using the Cascading Style Sheets (CSS) language.
In a graphical user interface, the usage of a mouse cursor may also change into a hand motif to indicate a link. In most graphical web browsers, links are displayed in underlined blue text when not cached, but underlined purple text when cached. When the user activates the link (e.g. by clicking on it with the mouse) the browser will display the target of the link. If the target is not a HTML file, depending on the file type and on the browser and its plugins, another program may be activated to open the file.
The HTML code contains some or all of the five main characteristics of a link:
- link destination ("href" pointing to a URL)
- link label
- link title
- link target
- link class or link id
It uses the HTML element "a" with the attribute "href" and optionally also the attributes "title", "target", and "class" or "id":
- <a href="URL" title="link title" target="link target" class="link class">link label</a>
The term "hyperlink" 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 essay by Vannevar Bush. In the essay, Bush described a microfilm-based machine 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. The closest contemporary analogy would be to build a list of bookmarks to topically related Web pages and then allow the user to scroll forward and backward through the list.
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 worldwide computer network, and advocated the creation of such a 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). See NLS.