HTML Agility Pack (HAP) is one of the most commonly used .NET package to parse HTML. It creates a document object model in memory, which can be use to manipulate the nodes (including both elements and attributes).
The package can be added to your project from NuGet via the following CLI:
dotnet add package HtmlAgilityPack --version 1.11.43
This code snippet provides one example of using this HAP to remove all
style attributes. The script can be run as C# script.
For more details, refer to Html Agility Pack.