AngleSharp by AngleSharp

<PackageReference Include="AngleSharp" Version="1.4.1-beta.505" />

 HtmlTagToken

public sealed class HtmlTagToken : HtmlToken
Class for StartTagToken and EndTagToken.

Gets the list of attributes.

public bool IsSelfClosing { get; set; }

Gets or sets the state of the self-closing flag.

public HtmlTagToken(HtmlTokenType type, TextPosition position)

Sets the default values.

public HtmlTagToken(HtmlTokenType type, TextPosition position, string name)

Creates a new HTML TagToken with the defined name.

public static HtmlTagToken Close(string name)

Creates a new closing HtmlTagToken for the given name.

public static HtmlTagToken Open(string name)

Creates a new opening HtmlTagToken for the given name.

public void AddAttribute(string name, TextPosition position)

Adds a new attribute to the list of attributes. The value will be set to an empty string.

public void AddAttribute(string name, string value)

Adds a new attribute to the list of attributes.

public string GetAttribute(string name)

Gets the value of the attribute with the given name or an empty string if the attribute is not available.

public void SetAttributeValue(string value)

Sets the value of the last added attribute.