HTML & CSS Wiki
Advertisement

A hyperlink (or link), in computing, is a reference to a document that the reader can directly follow, or that is followed automatically. The reference points to a whole document or to a specific element within a document. Hypertext is text with hyperlinks. Such text is usually viewed with a computer. A software system for viewing and creating hypertext is a hypertext system. To hyperlink (or simply to link) is to create a hyperlink. A user following hyperlinks is said to navigate or browse the hypertext.

A hyperlink has an anchor, which is a location within a document from which the hyperlink can be followed; that document is known as its source document. The target of a hyperlink is the document, or location within a document, that the hyperlink leads to. The user can follow the link when its anchor is shown by activating it in some way (often, by touching it or clicking on it with a pointing device). Following has the effect of displaying its target, often with its context.

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

The most common example of hypertext today is the World Wide Web: webpages contain hyperlinks to webpages. For example, in an online reference work such as Wikipedia, many words and terms in the text are hyperlinked to definitions of those terms. Hyperlinks are often used to implement reference mechanisms that predate the computer, such as tables of contents, footnotes, bibliographies, indexes and glossaries.

The effect of following a hyperlink may vary with the hypertext system and sometimes 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 follow hyperlinks; they 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 Web crawler.

In HTML, hyperlinking is done with the <a></a> element.


This page uses Creative Commons Licensed content from Wikipedia (view authors).
Advertisement