How to Link to an Anchor on an HTML

Linking to a Web page anchor lets you jump to different sections of the page with the click of your mouse rather than scrolling through pages of text to find what you want. The anchor is a designated area, such as a heading, that is given a distinct anchor name. You have the option to choose any part of your content and enter the code that links the text to the anchor, which creates a hyperlink (link). Using HyperText Markup Language (HTML) to link your anchors to the text requires inserting some code.

Instructions

    • 1

      Launch your text editor application, and open the HTML document that contains the anchor.

    • 2

      Locate the content that has the anchor to which you want to link, and make a note of the anchor name, which are the terms after the name attribute. The anchor code is found before the text, as in the following example:

      <a name="anchor_name">Text</a>

    • 3

      Position your cursor before the term(s) that you want to make a hyperlink. Enter "<a href=" ">" before the first word and a closing "</a>" tag at the end, like this:

      <a href=" ">Hyperlink Text</a>

    • 4

      Place your cursor between the quotation marks in the first tag, and type the anchor name preceded by a number sign.

      <a href="#anchor_name">

    • 5

      Save your document. The finished link looks similar to the following example:

      <a href="#anchor_name">Hyperlink Text</a>

Related Searches:

References

Resources

Comments

Related Ads

Featured