AngleSharp by Florian Rappl

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

 HtmlToken

class HtmlToken
The abstract base class of any HTML token.
public static readonly HtmlToken EndOfFile

Gets the end of file 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 IsEof { get; }

Gets if the token is an end-of-file token.

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 IsNameMissing { get; }

Gets the state of the name.

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 TextRange Range { get; set; }

Gets or sets the range of the token.

public HtmlTokenType Type { get; }

Gets the type of the token.

public HtmlToken(HtmlTokenType type)

public HtmlToken(HtmlTokenType type, string name)

public static HtmlToken Character(string characters)

Creates a new HTML character token based on the given characters.

public static HtmlToken Comment(string comment)

Creates a new HTML comment token based on the given string.

public static HtmlDoctypeToken Doctype(bool quirksmode)

Creates a new HTML doctype token.

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.