LESSON 7: Hyperlinks

  1. What is a hyperlink?
  2. Element A.
  3. Examples.

1. What is a hyperlink?

Hyperlink (or hypertext link) is an element in a HTML document that links to another place in the same document or to an entirely different document.

A text or an image is hyperlink if the mouse pointer changes to a hand over it. Typically, you click on the hyperlink to follow the link.

For example, the content items at the beginning of this lesson are hyperlinks.


Go to Top


2. Element A.

\..........Description

The A element denotes an anchor -- a hypertext link or the destination of a link.

The A element denotes a hypertext link if HREF attribute is used.

The A element denotes a destination of a link if NAME attribute is used.

Both attributes may be used in the same A element.

\..........Syntax

<A
    HREF="URI"
    NAME="name"
    TARGET="name">
.....
</A>

\..........Attributes

Attribute Description
HREF="URI" Specifies the hypertext reference for the link.
NAME="name" Specifies the destination for the link.
TARGET="name" Specifies the name of the frame, in which the link should be rendered. If no frame with such a name exists, the link is rendered in a new window.
Special frame names begin with an underscore:

_blank renders the link in a new, unnamed window;

_parent renders the link in the immediate FRAMESET parent;

_self renders the link in the current frame;

_top renders the link in the full, unframed window.

Note: Click here for more information about URI's.

\..........Examples to see

Examples 1-5 demonstrate A attributes.
Go to Top


3. Examples.

Choose an example and move below the text box to see the HTML code.

Example 1: Link to another document.
Example 2: Inside link.
Example 3: Using image as a link.
Example 4: Changing the color of links.
Example 5: Sending an E-mail.
Preview
Go to Top