SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: HTML Anchors, Links

Hybrid View

  1. #1
    SitePoint Guru navyfalcon's Avatar
    Join Date
    Jul 2007
    Location
    So California, Los Angeles county, USA
    Posts
    709
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    HTML Anchors, Links

    On my main page, I want to link to another page (inside the page)
    I have <a href="26_001.htm#Time">Time</a>
    26_001.htm is the page - #Time is the area in the page
    On the page to be linked to I have <a name="Time">Time</a>
    I found .html does not work but .htm does. It goes to that page but
    #Time does not go to <a name="Time"> the area in the page ???
    I checked several instructions on anchors and links to verify it was correct.
    What can I do to correct it ? Why does .htm work and .html not work ?
    -
    <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    -
    thank you
    falcon
    Many good Free Tutorials at:
    http://freetutorials.name

  2. #2
    Robert Wellock silver trophybronze trophy
    SitePoint Award Recipient xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,240
    Mentioned
    51 Post(s)
    Tagged
    0 Thread(s)
    Typically nowadays you use the ID attribute though the files *.htm and *.html are two different files respectably. Therefore <a href="index.htm#example"> differs to <a href="index.html#example"> they'd go to two different files. You obviously don't have a file of the correct name containing; #Time with the *.html extension so it should go nowhere specific on the latter page.
    };-) http://www.xhtmlcoder.com/
    Thinking Web: Voices of the Community

    > March 2013 - SitePoint forums: Spot the Error 3: Calling all Sleuths! Winner Announced!... She knows how to spot simple <code> errors but do you?

  3. #3
    SitePoint Guru navyfalcon's Avatar
    Join Date
    Jul 2007
    Location
    So California, Los Angeles county, USA
    Posts
    709
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thank You. That should help.
    falcon
    Many good Free Tutorials at:
    http://freetutorials.name

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
  •