|
Free HTML Link Code Reference
A Tag (Link to)
The <a></a> tags give us links. This is really the power of
the internet. As you look at a page, you can simply click a link and
instantly be transported millions of... oops, thousands of miles away.
|
Syntax
<A href="URL" href="URL#anchor" href="mailto:email"
name="anchor-name" target="location">
link-text-or-graphics
</A>
|
Modifiers
- HREF="URL"
- The domain and filename of the page you
are going to.
- HREF="URL#anchor"
- The domain, filename and anchor
name of the location on a page you are going to.
- HREF="MAILTO:email-name"
- Links to an email address
through your local email program.
- NAME="anchor-name"
- Set an anchor at the current
location on a page.
- TARGET="target-window-name"
- Defines the window the
link result will appear in. Options are _blank (a new
blank window), _self (current link window), _parent
(previous window), _top (full body of current window) or
top (into a new blank window).
|
Tips
- HREF="URL"
- The page address can be either relative
or absolute. If you are referencing a page within your
domain, you may simply call it by directory and name.
If the web page is outside your domain, then you need to
include the page type (http, ftp, gopher, mailto etc)
along with the domain and page name.
- HREF="MAILTO:name@domain.com"
- The MAILTO option
can mail to a single person, or many, if separated by
commas.
|
|
MAP Tag
The image map is a way to select different links from different places
on a graphic. For example, if we had a map of the United States, we
could have a different link for every state. Just click on the state and
get the state link!
Of course, the down side is a lot of time setting up some of these maps,
as you will see. ;-)
|
Syntax (build map)
<MAP name="name">
area-tags
</MAP>
|
Modifiers
- NAME="NAME"
- The NAME modifier defines the
collection of AREA tags describing different parts of
the image.
|
Syntax (use map)
<IMG src="url" usemap="name">
|
Modifiers
- USEMAP="NAME"
- The NAME is defined by the
<MAP></MAP> tags and should match the
graphic as well. See the <AREA> tag for more
information.
|
|
AREA Tag
The <area> tag is only valid within the <map></map>
tags. The area tag defines coordinates within a grapchic image to
include a popup definition and even link to something. This tag does not
use a closing tag.
|
Syntax
<AREA shape="shape" alt="alternate-text" href="URL"
coords="xx,yy,xx,yy..." target="target-window-name"
NOHREF>
|
Modifiers
- SHAPE="shape"
- The SHAPE modifier determines the
possible shapes of the area you are defining. The
options are: RECT, CIRCLE, POLY or
DEFAULT.
- ALT="alternate-text"
- The alternate text is for
those browsers without graphics (or the iconically
challenged).
- HREF="URL"
- The HREF modifier is the URL or web
page address of the destination you chose for this
link.
- COORDS="coordinates"
- The coordinates depend on the
information defined by the SHAPE modifier. A RECTANGLE
starts in one corner, defines the X and Y coodinates,
then moves to the next corner and the next until only
the last corner is left, which becomes an assumption. A
CIRCLE coordinates are the center X, Y then the radius.
A POLY is a polygon and works much like the RECTANGLE
but can have as many sides as you wish. The DEFAULT just
includes everything else.
- NOHREF
- The NOHREF modifier does not include a link. Just
the popup text.
- TARGET="target-window-name"
- Defines the window the
link result will appear in. Options are _blank (a new
blank window), _self (current link window), _parent
(previous window), _top (full body of current window) or
top (into a new blank window).
|
|
|