Put the input
in the label, and ditch the for
attribute
<label>
label1:
<input type="text" id="id1" name="whatever" />
</label>
But of course, what if you want to style the text? Just use a span
.
<label id="id1">
<span>label1:</span>
<input type="text" name="whatever" />
</label>