Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLLabelElement

HTMLLabelElement

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨July 2015⁩.

TheHTMLLabelElement interface gives access to properties specific to<label> elements. It inherits methods and properties from the baseHTMLElement interface.

EventTarget Node Element HTMLElement HTMLLabelElement

Instance properties

Inherits properties from its parent,HTMLElement.

HTMLLabelElement.controlRead only

AHTMLElement representing the control with which the label is associated.

HTMLLabelElement.formRead only

AHTMLFormElement object representing the form with which the labeled control is associated, ornull if there is no associated control, or if that control isn't associated with a form. In other words, this is just a shortcut forHTMLLabelElement.control.form.

HTMLLabelElement.htmlFor

A string containing the ID of the labeled control. This reflects thefor attribute.

Note:To programmatically set thefor attribute, usehtmlFor.

Instance methods

No specific methods; inherits methods from its parent,HTMLElement.

Specifications

Specification
HTML
# htmllabelelement

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp