Learn HTML step-by-step from A to Z or improve your professional skills.  Home HTML and CSS Tutorials Linking Things Together
Your Ad Here

Linking Things Together


The <A HREF> & <A NAME> Tags

<A HREF="http://bignosebird.com:80/index.shtml#SSEARCH">search</A>

The <A HREF> is the tag that glues the Web together! This is how you provide links to what are called URLs (Uniform Resource Locator). These typically are pages and images.

In the example above, the worst case scenario is given:

  • http://bignosebird.com indicates the server name.
  • :80 means TCP/IP port 80 (the default for HTTP)
  • index.shtml is the page being requested.
  • #SSEARCH means go to the <A NAME="SSEARCH"> anchor tag on index.shtml

Linking Things Together

Normally, links to pages on another server are called in the form:

<A HREF="http://bignosebird.com/index.shtml">click</A>

When referencing a page on your server:

<A HREF="/index.shtml">click</A>

The leading slash (/) indicates the absolute path relative to your document root directory. You can also use relative paths:

<A HREF="testdir/index.shtml">click</A>

To allow people to link to arbitrary points of your pages, do the following. Create the tags <A NAME="TAGNAME"></A> in the desired point of your page.

Then create links to it such as:

<A HREF="/pagename.html#TAGNAME">click here</A>

Note: ALL <A HREF> tags MUST be closed with a </A> tag.


Author's URL: Jeff Singer
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

HTML is Hyper Text Markup Language that is used to make hypermedia and hypertext documents for the Web. More HTML and CSS: Most Popular Materials | Fresh Materials | More HTML Tutorials at Markuptutorials.com

Add comments to "Linking Things Together"

Only registered users can write comment

Reader's comments