Hyperlink
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. 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. 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.
Links
Inline links
An inline link displays remote content without the need for embedding the content. The remote content may be accessed with or without the user following the link.An inline link may display a modified version of the content; for instance, instead of an image, a thumbnail, low resolution preview, cropped section, or magnified section may be shown. The full content is then usually available on demand, as is the case with print publishing software e.g., with an external link. This allows for smaller file sizes and quicker response to changes when the full linked content is not needed, as is the case when rearranging a page layout.
Anchor links
An anchor hyperlink is a link bound to a portion of a document, which is often called a fragment. The fragment is generally a portion of text or a heading, though not necessarily. For instance, it may also be a hot area in an image, a designated, often irregular part of an image.Fragments are marked with anchors, which is why a link to a fragment is called an anchor link. For example, in XML, the element
" provides anchoring capability, and in wiki markup, is a typical example of implementing it. In word processor apps, anchors can be inserted where desired and may be called bookmarks. In URLs, the hash character precedes the name of the anchor for the fragment.One way to define a hot area in an image is by a list of coordinates that indicate its boundaries. For example, a political map of Africa may have each country hyperlinked to further information about that country. A separate invisible hot area interface allows for swapping skins or labels within the linked hot areas without repetitive embedding of links in the various skin elements.
Text hyperlink. Hyperlink is embedded into a word or a phrase and makes this text clickable.
Image hyperlink. Hyperlink is embedded into an image and makes this image clickable.
Bookmark hyperlink. Hyperlink is embedded into a text or an image and takes visitors to another part of a web page.
E-mail hyperlink. Hyperlink is embedded into e-mail address and allows visitors to send an e-mail message to this e-mail address.
Fat links
A fat link is a hyperlink which leads to multiple endpoints; the link is a set-valued function.Uses in various technologies
HTML
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:
W3C organization website
This HTML code consists of several tags:
- The hyperlink starts with an anchor opening tag
, and includes a hyperlink referenceto the URL for the page.href="https://www.w3.org/ " - 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.
- The anchor closing tag terminates the hyperlink code.
- The
tag can also consist of various attributes such as the"rel"attribute which specifies the relationship between the current document and linked document.
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
s 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 , 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 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
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: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 file. It uses XML Property list syntax:Linux Freedesktop.org .desktop file
A file based hyperlink under Unix/Linux with a desktop environment is stored in a file. It is only supported under Linux. It is a text file with a syntax highly similar to the WindowsURL file described above. An example of a valid Freedesktop.org.desktop file is shown below: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 style file:Loading https://www.wikipedia.org...
How hyperlinks work in HTML
A link from one domain to another is said to be outbound from its source anchor and inbound to its target.The most common destination anchor 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 an 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 a fragment identifier "#id attribute" appended.
When linking to PDF documents from an HTML page the "id attribute" can be replaced with syntax that references a page number or another element of the PDF, for example, "#page=386".