HtmlHelper

Provides helper methods for working with HTML content.

Public Methods

public static IEnumerable<string> ExtractLinks(string html)

Extracts all links from the provided HTML content.

Parameters:

  • html (string): The HTML content to extract links from.

Returns: IEnumerable<string>

  • An enumerable collection of link URLs.

HasFragmentId

public static bool HasFragmentId(string html, string fragment)

Determines whether the provided HTML content contains a specific fragment identifier.

Parameters:

  • html (string): The HTML content to search.
  • fragment (string): The fragment identifier to search for.

Returns: bool

  • true if the fragment identifier is found; otherwise, false.