What's the “for” for in a label tag?
问题 Just ran across a for parameter in an HTML label tag: <label for="required-firstname"> First Name </label> <small>*</small> <input name="required-firstname" type="text" tabindex="2" id="required-firstname" size="24" maxlength="40"> I'm converting this form to a PHP processed script, can I get rid of the for= parameters? (And out of curiosity, what does it do?) 回答1: From w3schools.org: The tag defines a label for an input element. The label element does not render as anything special for the