AngleSharp by AngleSharp

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

 HtmlToken

class HtmlToken
The abstract base class of any HTML token.
public string Data { get; }

Gets the data of the comment or character token.

public bool HasContent { get; }

Gets if the character data contains actually a non-space character.

public bool IsEmpty { get; }

Gets if the character data is empty (null or length equal to zero).

public bool IsHtmlCompatible { get; }

Gets if the token can be used with IsHtmlTIP properties.

public bool IsMathCompatible { get; }

Gets if the token can be used with IsMathMLTIP properties.

public bool IsSvg { get; }

Gets if the given token is a SVG root start tag.

public string Name { get; set; }

Gets or sets the name of a tag token.

public TextPosition Position { get; }

Gets the position of the token.

public HtmlTokenType Type { get; }

Gets the type of the token.

public HtmlToken(HtmlTokenType type, TextPosition position)

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

Converts the current token to a tag token.

public bool IsStartTag(string name)

Finds out if the current token is a start tag token with the given name.

public void RemoveNewLine()

Removes the a new line in the beginning, if any.

public string TrimStart()

Removes all ignorable characters from the beginning.