Jump to content

Anchor Attribute Will Be Deprecated


Recommended Posts



if you scroll down you see this description under the <a "name"> attribute.


In future versions of XHTML the name attribute will be replaced by the id attribute!!


I use those anchors just like these forums do to point to a particular section of the site. ex. <a name="#thread31">


The above says it will be replaced by the id attribute, how would i got about using the id attribute to do the same...I thought the id attribute was use like classes on CSS.

Link to comment
Share on other sites

I believe it would be something like


><a id="anchor" href="/forums/articles/79.php" title="go to article 79">go to article 79</a>


but I haven't read the specs. I'm not sure how many browsers would recognize that at the moment, either.


note: I am guessing, and may be completely wrong. :dance:


note, you can read more about this in the official proposals which do not yet utilize id's for anchors :(

Edited by TCH-Lisa
Link to comment
Share on other sites

interesting....  I was too lazy to try that out...  I just did now and you are absolutely correct..  That means all my existing id's i'm currently using can be anchors...holy crap  :goof:  :blink:  :blink:  :blink:

Yes, but I believe that's been the case for awhile. You should be able to use any ID location as a destination for a link on any modern browser (I even checked IE 5.2 and it works).


So <a id="blah">, or an ID in other tags as well, should work as a link destination.


w3c.org has some more info here.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...