7. links & anchors

Preview:

DESCRIPTION

 

Citation preview

Links & Anchors

An anchor is a special tag that does not

determine the appearance of text.

It indicates a connection between

the current document and some

other entity.

There are several types of anchor,

but all of them use the <A> ... </A>

tag

Start tag: required, End tag: forbidden

The hypertext reference appears in

the text as a highlighted hotspot

word or phrase; often coloured, and usually

underlined.

The format for a target is:

<A NAME="target_name">hot spot text</A>

target_name is a symbolic name that can

be referenced in other anchors;

href attribute means "hypertext

reference";

the hash sign (#) means that it is an internal reference.

Clicking on it takes you to the target identified by

target_name.

Links between files

By far the most common use of a link is to retrieve

another Web resource

However, authors may insert links in their documents.

Links express other types of relationships have one or more link types specified in their source anchor.

This attribute describes the relationship from the current document to the anchor specified by the href attribute.

rel

This attribute is used to describe a reverse link from the anchor

specified by the href attribute to the current document.

rev

This attribute specifies the character encoding of the resorce designated by the

link.

charset

Consider two documents A and B.

Document A: <LINK href="docB" rel="foo">

Has exactly the same meaning as:Document B: <LINK href="docA" rev="foo">

Both attributes may be specified simultaneously.

to see more examples : go to the learnit.am

Recommended