section31 Posted May 4, 2004 Posted May 4, 2004 http://www.w3schools.com/tags/tag_a.asp 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. Quote
LisaJill Posted May 4, 2004 Posted May 4, 2004 (edited) 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. note, you can read more about this in the official proposals which do not yet utilize id's for anchors Edited May 4, 2004 by TCH-Lisa Quote
section31 Posted May 4, 2004 Author Posted May 4, 2004 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 Thanks for the tip.. Quote
LisaJill Posted May 4, 2004 Posted May 4, 2004 Woah, slow down there. Did you test this cross-browser? IE? Firefox? Mozilla? Opera? Several platforms? Do that before you go ditching old anchors. If you do that, come back and tell me? I'm way too lazy to try that out... *grins8 Quote
MikeJ Posted May 5, 2004 Posted May 5, 2004 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 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.