Html-label-tag
提供:Dev Guides
HTML-<label>タグ
説明
HTML <label>タグは、テキスト、テキストエリアなどのフォームコントロールにラベルを追加するために使用されます。
例
これは、次の結果を生成します-
グローバル属性
このタグは、− link:/html/html_attributes_reference [HTML属性リファレンス]で説明されているすべてのグローバル属性をサポートします
特定の属性
HTML <label>タグは、次の追加属性もサポートしています-
Attribute | Value | Description |
---|---|---|
formhtml-5 | form_id | It specifies one or more forms the label belongs to |
for | control id | Specifies the input control that this label is for. This value must be the same as the value in the input control’s "id" attribute. |
イベント属性
このタグは、− link:/html/html_events_reference [HTMLイベントリファレンス]で説明されているすべてのイベント属性をサポートします。
ブラウザのサポート
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |