Attribute for <A ...>NAME = "text string"
NAME = "text string"
For example, suppose you have a long page with a section about purchasing. You could create a named anchors in the sub-header for that section like this:
Note that the
To link to a named anchor, add a hash mark to the end of the URL of the page followed by the name. For example, to link to a section named
purchasing within the page called
we would create a link like this:
which gives us this link:
If the link is to a named anchor in the same page then you don't need the file name of the page, just the hash mark and the name of the anchor. For example, you could put a set of links at the top of a long page that link to sections within the page. To link to the purchasing section in our example above you would put a link like this:
|this code||produces this|
|the links at the top of this page|
Don't forget the hash mark. That's the most common mistake made in this type of linking and has been a source of frustration for many webmasters. Remember these two rules:
|The named anchor itself doesn't have a hash mark.||
|A link to the named anchor always has a hash mark.||