Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I always remembered this as being "invalid" HTML, but a quick Google search turns up nothing. Can anybody shed some light?


It's not invalid; it's one of the two ways of using a label element. However, IE 6 didn't support it which is why I always resorted to the ID variant. The difference in typing isn't that large anyway.


Are you thinking Improperly nesting elements?

    <i>Some <b>text</i> here</b>
In that case, the label tag surrounding the input tag doesn't violate this rule.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: