- From: David Woolley <forums@david-woolley.me.uk>
- Date: Thu, 26 Jun 2008 08:17:49 +0100
- To: www-html@w3.org
Sebastian Mendel wrote: > > i used to use name="" to group equal elements, or in other words, same > element placed more than once on a page As others have pointed out, the general way of grouping things is to use class. > > e.g. a footnote <sup name="footnote_1">1</sup> This specific case is clearly a hypertext link, and for HTML you would need an A element. Some versions of XHTML allow links on most elements. Again for HTML 4, the link should have a rel or rev attribute to indicate that it is a link to a footnote. Modern CSS can recognize such patterns. > > (and than i used the name to attach a mouse hover event to it which > displayed the content from the bottom in a bubble hint) > > but this is now deprecated There has been no change for the example you quote. NAME has never been allowed in that context. Except for form controls, NAME started to be run down in 1999 (drafts of HTML 4 go back to 1997 or earlier), and for A, it is a synonym (strictly speaking you could probably have both ID and NAME, with different values) for ID, and in that context is required to be unique, so you couldn't legally use it on A in the way that you use it. I'm not sure why it wasn't deprecated for A at that time; it was clearly only retained for legacy content and legacy browsers. Anyway, the semantics of your example require that you use a hypertext link, so that is probably the best approach. Failing that, you can use class. If you think you need name, in the short term, as you are using XHTML, you can create your own namespace, although that might make it inaccsseible to the DOM (not checked). In the long term, you could campaign for it as a new feature. You cannot campaign for it to be undeprecated, because it never existed to be deprecated. -- David Woolley Emails are not formal business letters, whatever businesses may want. RFC1855 says there should be an address here, but, in a world of spam, that is no longer good advice, as archive address hiding may not work.
Received on Thursday, 26 June 2008 07:16:21 UTC