<label for="user-id">ID</label>
<input type="text" id="user-id"> <!-- ユーザーインターフェースを提供するコントロール要素 -->
ブラウザーでの実際の表示例
<!--
    # マッチさせるコントロール要素のid値である「user-checking」を
    # labelタグのfor属性の値として指定しています。
-->
<label for="user-checking">こちらをクリックしてください。</label>
<input type="checkbox" id="user-checking">
ブラウザーでの実際の表示例 <label>のテキスト(「こちらをクリックしてください。」)をクリックすると、関連付けられたチェックボックスにフォーカスが当たります。
<label>
    こちらをクリックしてください。
    <input type="checkbox">
</label>
ブラウザーでの実際の表示例 <label>のテキスト(「こちらをクリックしてください。」)をクリックすると、関連付けられたチェックボックスにフォーカスが当たります。
<input type="text" title="名前" id="user-name">
<label>
    <input type="checkbox" name="privacy">
    <a href="privacy.html">プライバシーポリシー</a>に同意します。
</label>
<label>
    <input type="checkbox" name="privacy">
    プライバシーポリシーに同意します。
</label>
<p><a href="privacy.html">プライバシーポリシーを見る</a></p>