Gyrus <gyrus@rooted.freeuk.com> wrote:

> 1. In XHTML, you're advised to replace name attributes with ids.

Only name attributes that are being used to uniquely identify an element on
the page. eg. <a name>, <map name>...

> What about radio form elements?

All form field names (<input name>, <select name> etc.) are 'control
names', and are a different thing to the use of 'name' in <a>. Form fields
must continue to have name attributes for them to be submitted properly.
There is no uniqueness constraint for this kind of name.

(This confusion is one of the reasons <a name> is being deprecated; using
the attribute 'name' for two completely different purposes is confusing.)

A further element of confusion comes from the <label for> attribute.
Despite its forms-centricness, the for attribute referes to an 'id', *not*
a 'name'. (Which makes sense - a label should apply to one control, not a
group of controls.) So if you want to use a labelled element, it must have
a 'name' and an 'id'. They need not be the same.
and@doxdesk.com