AngleSharp by AngleSharp

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

 HtmlToken

public class HtmlToken : ISourceReference
The abstract base class of top-level HTML tokens.
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 IsProcessingInstruction { get; }

Indicates that this comment token is a processing instruction.

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, string name = null)

Creates a new HTML 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 new line in the beginning, if any.

public string TrimStart()

Removes all ignorable characters from the beginning.