Re: name="" deprecated in XHTML

> like you would use id, name and class in real world
Using that example, a class can contain more than one student, right?
The same is true for the class attribute - it can contain more than
one value. With a name, it is a unique identifier, much like id,
except that on occasion you run into two people with the same name,
not necessarily the same person. An id is a unique identifier that
distinguishes between two things. If there are two people with the
same name, they would have a different id.

I'm saying that I can understand your point. However, class and id
suit your needs. What is wrong with class="name", for example? After
all, a person's name is just a part of that person. To describe a
person, you might do something like this with the class and id
attributes:

   class="male" id="Sebastian_Mendel"

There! You just identified your sex and your personal name. However,
there is the case that your name is the same as another person's. For
that reason, you might be assigned an ID number:

   class="Sebastian_Mendel male" id="SMendel39384"

Anyway, the idea of a name attribute seems to name the element, which
already has a name. A 'p' element is called a "paragraph", for
example. With the id attribute, it identifies the element. It is an
alias for that specific element. For a class, it is one element of
possibly many in the class.

For what it is worth, the name attribute was retained on form
elements, it seems. The only reason I can think of for it remaining is
for backward compatibility. Nobody wants to redesign their forms, and
there honestly isn't another way to group controls such as radio
buttons together. However, other elements don't need it. After all, if
you gave two links the same name, which link would <a
href="#linkName">text</a> point to - the first link or the second
link? There are likely similar reasons, but that is one that creates a
lot of ambiguity.

If you can provide a possible use case where it would be beneficial
that can't be done equally well by making use of class and id, I'm
sure someone will give it some thought.

Dustin Boyd


On Wed, Jun 25, 2008 at 09:46, Sebastian Mendel
<lists@sebastianmendel.de> wrote:
>
> Johannes Koch schrieb:
>>
>> Hi Sebastian
>>
>> Sebastian Mendel schrieb:
>>
>>> i used to use name="" to group equal elements, or in other words, same
>>> element placed more than once on a page
>>>
>>> e.g. a footnote <sup name="footnote_1">1</sup>
>>
>> AFAIR, the sup element never had a name attribute...
>
> i know, but does not change much on the topic, or?
>
> it could also be an img or select (for which name attribute is valid in HTML
> 4.01)
>
>
>>> (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
>>
>> ... So it cannot be deprecated now. However, the use of name for a,
>> applet, form, frame, iframe, img, and map is deprecated in XHTML 1.0 (see
>> <http://www.w3.org/TR/xhtml1/#h-4.10>).
>
> yes, and that is what i am talking about, and do not understand
>
> i think there are good reasons for an attribute "name" beside "id" and
> "class"
>
> like you would use id, name and class in real world
>
> --
> Sebastian Mendel
>
>



--
Waiting patiently for Windows 7, XHTML 2.0, CSS 3.0, PHP 6.0, the
ratification of C++0x, and the day that I can code without logic
troubles.

Received on Wednesday, 25 June 2008 15:39:15 UTC