Re:Obscure HTML tags that you should know and even use
by LogicHoleFlaw on Saturday February 14, 2009 @06:33PM
(#481535)
Once I started using <label> for all my forms, I became quite keenly aware of others' forms which don't use it. It's extremely convenient.
edit: http://htmldog.com/ has great tutorials on modern and complete form building. It's a fantastic resource.
You can associate a label with any element without having to nest the element in the label too; just use label's for attribute with the element's ID. It's useful, for example, if you want the labels in one column and the form controls in another.
Make sure to have the label take the maximum available space; if you have a label centered in a table cell you want the label to span the whole cell so it's easier to click on it to select the associated control.