I\'ve been using formtastic in order to generate HTML forms on rails applications. My question, however, is really HTML-related.
Today I found a strange behaviour on
Can anyone tell me why enclosing checkboxes inside their
tag might be a good idea
It might be a good idea because you could lose the id and for attributes in this case, making the markup simpler. When an is inside a , the connection between them is implicit. (See HTML4 section 17.9.1.)
However, in practice this doesn't work in IE, so you lose that potential advantage.
I can only assume in this case it's for layout/styling reasons.