Results 1 to 4 of 4

Thread: Linking to a paragraph in the same page

  1. #1
    Join Date
    May 2005
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Linking to a paragraph in the same page

    This is common in web pages I guess, but I don't know how to do it.

    My page consists of several titles, and several corresponding paragraphs. I need each title when clicked on link to its corresponding parag. (in the same page)

    Hope I was clear,
    Thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The link will look like this:
    Code:
    <a href="#label">Link Text</a>
    label is a descriptive name for the section in the page you want to go to. Then you put this right above said section:
    Code:
    <a name="label"></a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2005
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot

  4. #4
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    <a name="label"></a>
    Alternatively, place an id attribute on the paragraph element and link to that:

    HTML Code:
    <a href="#fragment">...</a>
    
    <p id="fragment">...</p>
    It won't work in NN4, but it shouldn't be critical whether it did or not.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •