How do I create anchor links?

Anchor links can help your visitors navigate sections of a long page by taking them directly to a particular area of the page. An anchor link consists of two parts:

  1. The link code:
    Link
  2. The anchor code:
    Anchor

Note that the difference between the two links is the # symbol within the tag, as well as the tag. To create your anchor links:

  1. First build your link code:
    #myLink">Link

    (Note that this link features a # symbol within the tag, which tells the browser to link to a corresponding anchor tag named myLink.)

  2. Now create your anchor link. Use the exact same name as in your link code:
    name="myLink">Anchor

    Once again, this is not a normal link, because the link uses the word name instead of href. Which is important, because it tells the browser where to go when your first link is clicked.

To make your anchor tags work correctly, the word that appears in the quotes in the anchor and link tags must match. For example:

news">The Latest News

news">News

Or:

style">Styles

style">Cardigan Sweaters

To see an example of a working anchor link, click "link":

link

space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space
space

anchor

  • Was this article helpful?

  • Yes
  • No

Still need help?