Can a label only refer to input elements?
问题 W3Schools have this to say about labels: The <label> tag defines a label for an input element. [Emphasis mine] Does this mean that the following HTML isn't valid? <!doctype html> <html> <head> <title>Example document</title> </head> <body> <label for="x">Label</label> <hr> <div id="q" contentEditable="true">Hello</div> <hr> <div id="x" contentEditable="true">World</div> </body> </html> Both Chrome and IE8 give focus to World when Label is clicked, Firefox does not. Which is correct? 回答1: