AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="0.9.8.1" />

.NET API 1,214,976 bytes

 HtmlLabelElement

Represents the HTML label element.
using AngleSharp.Dom.Css; using AngleSharp.Dom.Events; using AngleSharp.Extensions; using AngleSharp.Html; namespace AngleSharp.Dom.Html { internal sealed class HtmlLabelElement : HtmlElement, IHtmlLabelElement, IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IElementCssInlineStyle, IGlobalEventHandlers { public IHtmlElement Control { get { string htmlFor = HtmlFor; if (!string.IsNullOrEmpty(htmlFor)) { IHtmlElement htmlElement = base.Owner.GetElementById(htmlFor) as IHtmlElement; if (htmlElement is ILabelabelElement) return htmlElement; } return null; } } public string HtmlFor { get { return this.GetOwnAttribute(AttributeNames.For); } set { this.SetOwnAttribute(AttributeNames.For, value, false); } } public IHtmlFormElement Form => GetAssignedForm(); public HtmlLabelElement(Document owner, string prefix = null) : base(owner, TagNames.Label, prefix, NodeFlags.None) { } } }