href Attributehref Attributehref is declared on the element: basehref is declared on the elements: link, a, areaThe href attribute specifies a URI.
base elementOn the base element, the href
attribute gives the base URI for the document (i.e. the URI from which all relative URIs in the document should be resolved).
This must be an absolute URI. See also the codebase attribute of the
object element.
On the a,
link and
area elements, the href attribute
gives the target location of the link, which may be either an absolute or relative URI.
Note: If an empty string is assigned to the href attribute of one of
these hyperlink elements, this is usually interpreted as a link to the beginning of the document at the current URI (or base URI, if different):
i.e. a link to the current (or base) URI, including any query string but stripping off any fragment identifiers.
However, some user agents do not interpret a blank href in this manner - e.g. Konqueror, which seems to remove also
any 'filename' from the current (or base) URI (i.e. anything following the final slash - but retaining any query string).
For maximum cross-browser compatibility (which, in my opinion, is a must for any public resource),
this means that links to the top of the current page should be made explicitly to an anchor located there,
e.g. href="#top", rather than by using href="".