HyperTextMarkupLanguage

HTML basics - Part 2

| Home | HTML basics - Part 2 - Agenda | Next |

Basic tags

A - Hyperlinks

Appearance: <A HREF=url > </A>
Attributes: HREF=URL, NAME=string, REL=string, REV=string, TITLE=string

EXAMPLE



<A HREF="http://www.presidents.com/home/president.htm">
US President's Home Page </A>
   or
<A HREF="president.htm"> US President's Home Page </A>
   or
<A HREF="#Clinton">Clinton</A>
   with
<A NAME="Clinton"> Bill Clinton</A>


The hyperlink tag is the foundation of creating a link, but it alone does nothing for us. We need to add some attributes to make it function.

Hypertext

The hypertext is the "hot spot" that describes the "target" that the browser will jump to. Hypertext can be text or an image. The hypertext is not an attribute, but appears within the Hyperlink element. In the examples above, US President's Home Page is the hyper text.

HREF (Hypertext REFerence Attribute)

HREF=url

The HREF attribute designates the target or URL of the Hyperlink. The url can be:

NAME

The NAME attribute allows you to use named anchors as places that can be jumped to directly within the same page. This is done using the form

<A NAME="label">...</A>


where label is any text you choose. This is tied to another Hyperlink tag with an HREF attribute with the following format:

<A HREF="#label">some text</A>

TITLE

The TITLE attribute can be used to provide a description of that location, which is displayed by some browsers when the mouse moves over the URL.

REL and REV

These tags are rarely used. They are used to mark a relationship between the current page and the link page.


| Home | HTML basics - Part 2 - Agenda | Next |

T07D033