HtmlLabelElement Class

https://html.spec.whatwg.org/multipage/forms.html#htmllabelelement

public sealed class HtmlLabelElement : HtmlElement
Inheritance
HtmlElement HtmlLabelElement

Properties

NameDescription
Controlhttps://html.spec.whatwg.org/multipage/forms.html#labeled-control
Formhttps://html.spec.whatwg.org/multipage/forms.html#dom-label-form
HtmlForGets or sets the value of the for content attribute.

https://html.spec.whatwg.org/multipage/forms.html#labeled-control

public HtmlElement? Control { get; }

https://html.spec.whatwg.org/multipage/forms.html#dom-label-form

public HtmlFormElement? Form { get; }

Gets or sets the value of the for content attribute.

public string HtmlFor { get; set; }