HTML - статьи

A


Description

The A element brackets (or anchors) a piece of text (and/or image) which

is identified as a hypertext link.

The A element must have either an HREF attribute or a NAME attribute.

The HREF attribute identifies a destination ,

and the bracketed text is rendered as a hypertext link to the URL.

Browsers will display the contents of an A element with an HREF attribute

in a special manner to indicate that if the contents are selected,

the browser will execute that hypertext link.

The NAME attribute identifies a destination tag, and the bracketed text

is thereby identified as an available hypertext target

within this document.

Browsers do not display the contents of an A element with a NAME attribute



in any special way.

However, an A element with an HREF attribute can now be constructed

by using the document URL suffixed with #name.

This will load the document, but will position the display

starting at the location of this NAME tag.

An A element with an HREF attribute can also be constructed

to jump directly to this destination tag within the same document

by a URL consisting solely of #name

The presence of REL=relation

in document A with HREF to document/object B

identifies a relationship that B has to A that A recognizes/authorizes/verifies.

The presence of REV=relation

of the identical relation

in document B with HREF to document/object A

identifies a desired/expected/claimed relationship that B has to A,

but must be verified by checking with A.

Minimum Attributes

<A HREF="..." >characters...

</A>

or

<A NAME="..." >characters...

</A>

All Possible Attributes

<A HREF="..."

NAME="..."

REL="..."

REV="..."

URN="..."

TITLE="..."

METHODS="..."

LANG="..."

DIR=ltr|rtl

CHARSET="..."

ID="..."

CLASS="..."

MD="..."

TARGET="..."

SHAPE="...">characters...


</A>

Elements Allowed Within...

members of groups

but not element

Allowed In Content Of...

Any element that permits members of group

Variations

The LANG, DIR and CHARSET attributes are introduced with the

internationalization proposal.

The CHARSET attribute is a hint as to the expected

character set used by the hyperlink.

Earlier proposals suggest changing the NAME attribute to ID,

declaring the NAME attribute as obsolete,

and adding an ID attribute for various elements

including the paragraph and heading elements.

With the ID, MD, and CLASS attributes as part of the style sheet

proposal, this is likely to change.

At present REV and REL are rarely used or supported,

and are Level 1 attributes,

but are of growing interest to automated document environments.

These relationships are more commonly identified in the

of the document using the element.

REL and REV can be either a comma-separated or white space separated

set of relationship(s) of the HREF link.

One proposal suggests that comma imply "or" and white

space imply "and" for a list of values.

These relationships and their semantics were originally proposed

to be registered with an HTML authority, which was described at

http://www.w3.org/hypertext/WWW/MarkUp/RegistrationAuthority.html,

but that link no longer responds. The entire topic of link relationships

is under active discussion and change.

Early examples of relationship names are

UseIndex, UseGlossary, Annotation, Reply, Embed,

Precedes, Subdocument, Present, Search, Supersedes, History, Made,

Owns, Approves, Supports, Refutes, Includes, Interested.

URN is for a Universal Resource Number, and is not currently

used or supported, and is a Level 1 attribute.

RFC 1866 describes it as a preferred, more persistent identifier

than the value of HREF.

TITLE is little used or supported, and is a Level 1 attribute,

but is expected to be the title of the HREF document.

RFC 1866 suggests TITLE can be displayed as a margin note



or on a small box while the mouse is over the anchor.

(ed. I am unaware of any browser that has implemented this

feature.)

METHODS is little used or supported, but is expected to be

a white-space-separated list of HTTP METHODS supported by the

object and accessible to the user.

RFC 1866 suggests that the content of the A element may be

rendered differently depending upon the HTTP method.

TARGET is a Netscape 2.0 extension to define a window name for use

by the retrieved hyperlink. If the named window is not already

open, Netscape 2.0 will open a new window and assign it that name.

See also the element for naming a window.

SHAPE is proposed to provide a mechanism to define

multiple A elements and corresponding "hotzones" within the

proposed element, to perform the equivalent function

of ISMAP without the need for writing a responding cgi-bin program.

For an alternate proposal, see the element.

A is a Level 0 element.


Содержание раздела