Question:

Best way to Link to Part of a Page on a Web Site

by Guest4817  |  10 years, 10 month(s) ago

0 LIKES UnLike

One of my friends is searching for the details about best way to Link to Part of a Page on a Web Site?

 Tags: Link, page, site, Web

   Report

1 ANSWERS

  1. Guest7722

     Many times it is attractive to connection to a exact part of a Web page. When a sheet comprises many of data, it is better to shatter down the content into parts and let readers leap into the ones that they are most involved in. This keeps readers the problem of scrolling down long sheets in seek of what they need. You can connection to a part of a sheet either from inside itself, for example for a click-able table of contents like Wikipedia values, or from another Web page.

    Creating Anchor Name

    • Open a Web sheet in a text reviewer or HTML editor. Locate the first line of the part of the sheet you desire to connection to. For demonstration, if you desire to connection to "Section 1" of a sheet, scroll down to that part of the page. Usually this will have a sub-heading with header tags, for example <h2>Section 1</h2> or <h3>Section 1</h3> or formatting tags for example <strong>Chapter 1</strong>.

    • Insert the HTML <a> tag with ascribe "name" to that line. Give a title for the anchor as its value.

    Example:

    <h2><a name="section1">Section 1 of this page</a></h2>

    • Save internet page.

    Linking to Anchor Name

    Go to another part of the sheet, for example beside the top. Or, if you desire to connection from a distinct sheet, open that other Web page. For example, you may desire to conceive your connections in an overview part that will have a table of contents.

    • Type the text that you desire to add a hyperlink in. For example: "Go here to read Section 1."

    • Insert the HTML <a> tag with ascribe "href" and use the anchor title as its value. Add a hash assess (also called "pound") before the name. If you are connecting from a distinct sheet, add the document title of that sheet before the hash mark.

    Example for connecting to a part inside the identical page:

    <a href="#section1">Go here to read Section 1 of this page.</a>

    Example for connecting to a part inside another page:

    <a href="webpagename.html#section1">Go here to read Section 1 of another page.</a>

    Example for connecting to a part inside a sheet that is in another website:

    <a href="http://otherwebsiteurlhere.com/webpagename.html#section1">Go here to read Section 1 of another page.</a>

    • Save internet page.

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 11 years, 3 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.