4 ms·
If you use the for attribute clicking on the label will focus the related input.
by realityking 10y ago
If you use the for attribute clicking on the label will focus the related input.
- mook 10y agoBut that means there may be an area between the label and the input element (depending on margins and so forth) which is not clickable. Having the label separate makes sense if it's all in a table-like structure, though.