Is it better to wrap the label tag around a form item or use the "for" attribute in HTML?

Viewed 35611

I know that you can use both but is it better to use one over the other? If so, why?

Example of "for" attribute:

<input type="text" id="male"><label for="male">Male</label>

Example of wrap:

<label>Age:<input type="text"></label>
8 Answers
Related