Barney Carroll wrote:
Stuart Foulstone wrote:
Hi,

The "for" attribute should NOT be used when the label tag encloses the
label text.

What are the dangers?


Regards,
Barney


Hello,
Its probably not a danger per se for most people but if you ever use a cms that writes out form fields sometimes they write out hidden fields along with them, if these are wrapped in a label along with the intended input/select/whatever then firefox chokes, I can't remember now whether it was only when the visible input wrapped in the label had no id matching the for attribute. If the label wraps a select and there are hidden inputs inside that label then the select does not stay open unless you click and drag the mouse to the desired option.

Basically either way is fine, so long as it's one input per label.

Rob



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to