Links and anchors
<a>
…</a>
Creates an element that becomes a hyperlink with the href
(hypertext reference) attribute set to a URL; additionally the attribute title
may be set to a hover box text, some informative text about the link:
<a
href="URL" title="additional information">
link text</a>
In most graphical browsers, when the cursor hovers over the link, the cursor typically changes into a hand with a stretched index finger and the additional information pops up, not in a regular window, but in a special "hover box", usually similar to a Tooltip, which disappears when the cursor is moved away. Some browsers render alt text the same way, though this is technically incorrect.
Alternatively (and sometimes concurrently), the element becomes an anchor with the name
attribute set, which preceded by a number sign '#', and appended to the URL, acts as a link target (a "document fragment"), typically causing a Web browser to scroll directly to that point of the page. Any element can be made into an anchor by using the id
attribute, so using <a name="foo">
is not necessary.