Results 1 to 2 of 2

Thread: Page Markers?

  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts
    If I have a link ( http://www.iep.utm.edu/natlaw/#H4 ) I understand the the #14 is the part that takes me to a certain spot in the page. If I am designing the page, what code or attribute do I use to accomplish the marker that will allow the link to go right to that specific spot in the page?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by CWBillow View Post
    If I have a link ( http://www.iep.utm.edu/natlaw/#H4 ) I understand the the #14 is the part that takes me to a certain spot in the page. If I am designing the page, what code or attribute do I use to accomplish the marker that will allow the link to go right to that specific spot in the page?
    You have two options. One is an empty anchor tag with a name attribute. The second is to take advantage of an existing tag and match the hash tag text to a matching id attribute.

    Example #1:
    Code:
    <a name="H4"></a>
    
    This is my content</p>
    Some authoring tools call this a "bookmark."

    Example #2:
    Code:
    <p id="H4">This is my content</p>
    Note that older browsers didn't recognize the second method.

    Edit: Since <h4> is a tag name, you might want to use something else.

Posting Permissions

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