Home HTML Guides Sitebuilder Q & A Resources Forum
J-ROBINSON.co.uk
HTML Central The Hunger Site - give food for free!


HTML GuidesInternal Links

As well as linking to external files, you can link to specific points within the current page. All you do is mark the points and add the links - like this...

Internal links are best used on pages with lots of information. You may well have seen it on a FAQ page, where the questions link to their answers. Decide where you want to link to, and add the following to the code:

<A NAME="point1"></A>

Yet again it's the A tag we're using, but no HREF this time. The NAME attribute lets you name this point - something more descriptive than point1 would be useful though. This is how we'll be referring to this point later.

You still need a closing A tag, but you don't necessarily need to put a description in. Sometimes you'll want to, sometimes you won't - it doesn't matter, since this A tag does not change the appearance of the text at all.

Linking to your Markers

Now you've added your marker(s), you just need to link to them. It's A again, this time with HREF and the name of the marker (preceeded by a #) as the path:

<A HREF="#point1">Click here to jump to point 1</A>

Click here to jump to point 1

This is a doddle, isn't it?

Linking from other Files

You can also link to these markers from external files - i.e. link to a specific point in another document. Set up the markers and link to the file as usual - just add a # and the marker name to the path:

<A HREF="../myfile.html#point1">Click here to jump to point 1 in myfile.html</A>

Click here to jump to point 1 in myfile.html

Take Care!

Whenever you create links (internal or external) the spelling and case of the path must be exactly correct - a computer does not recognise "nearly right" paths - it's right or it's not. The most common cause of problems with links is in their spelling, so check all your links as you make them.

HTML Central Home
    HTML Guides
        Links

< 1 | 2 | 3 >

Search:
 
Search facility provided by Atomz.com.
HTML Guides: Click here for HTML Guides index.

HTML Central Home
    HTML Guides
        Links

< 1 | 2 | 3 >

Navigation Bar
Please send any comments, questions or complaints via this form
HTML Central is part of j-robinson.co.uk
© James Robinson 2001

Valid HTML! Valid CSS! Labelled with ICRA