SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: <a name

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    Newport News, VA USA
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <a name

    Has Moziila (1.2.1) and Opera (7.0) stopped supporting anchor names

    <a name="#top"></a>
    <a href="#top">Top</a>

    There are docs around on using ID, but none that say <a name> is a depreciated element. The descritons on ID are pretty weak. Searching forums for "a name" gives some pretty wacky returns!

    It validates as 4.01 and works in IE. In Mozilla, it works only if the <a name> is defined in the html prior to a <a href> call. Opera is nada...

    TIA -David
    -David

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No # in the anchor name

    Example:
    http://www.w3.org/TR/REC-html40/struct/links.html#edef-A

    If you check the source; you see that the name attribute is
    The <A name=edef-A>A</A> element

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    Newport News, VA USA
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    jofa,

    Yep! That fixed it. Simple things get me more often than complicated 1s Thanks.
    -David

  4. #4
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you use code (exactly) like this:

    <a name="#top"></a>

    It may be usefull for you to know that you can link to any element with an ID using href="#xxx"

    Like:
    Code:
    <h1 id="start">Header</h1>
    <p>text text text</p>
    <p><a href="#start">Go to Start</a></p>
    Regards,
    Douglas
    Hello World

  5. #5
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Location
    Newport News, VA USA
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've kind of hung away from ID. It may be outdated now, But at 1 time ID was supported real well.

    http://www.htmlhelp.com/reference/html40/special/a.html

    I may need to relook into it. Thanks.
    -David

  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Originally posted by David Bethel
    I've kind of hung away from ID. It may be outdated now, But at 1 time ID was supported real well.

    http://www.htmlhelp.com/reference/html40/special/a.html

    I may need to relook into it. Thanks.
    Actually, id is supported better than "name" is nowadays, except for form elements. The "name" attribute has been dropped in the XHTML spec for everything but form objects.

  7. #7
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Posts
    68
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    especially since search engines rate the page higher when there are links with words on the page...i've found i have started to use a lot more <a href="#name"> tags!

    good tip with the ID attribute in elements, thanks!
    Google, Inktomi, and AltaVista ranking report!
    Top25Web.com: Search Engine Forums


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
  •