HtmlTinkerX 2.2.0
dotnet add package HtmlTinkerX --version 2.2.0
NuGet\Install-Package HtmlTinkerX -Version 2.2.0
<PackageReference Include="HtmlTinkerX" Version="2.2.0" />
<PackageVersion Include="HtmlTinkerX" Version="2.2.0" />
<PackageReference Include="HtmlTinkerX" />
paket add HtmlTinkerX --version 2.2.0
#r "nuget: HtmlTinkerX, 2.2.0"
#:package HtmlTinkerX@2.2.0
#addin nuget:?package=HtmlTinkerX&version=2.2.0
#tool nuget:?package=HtmlTinkerX&version=2.2.0
HtmlTinkerX
HtmlTinkerX is a .NET library for parsing and inspecting HTML, CSS, and JavaScript. It includes static extraction, website crawling, audit-oriented page analysis, email CSS inlining, and Playwright browser automation. PowerShell users can access the same engine through the PSParseHTML module.
Install
dotnet add package HtmlTinkerX
Pin a stable HtmlTinkerX version when reproducible restores matter.
Parse HTML
using AngleSharp.Dom;
using HtmlTinkerX;
IDocument document = HtmlParser.ParseWithAngleSharp("""
<article>
<h1>Service status</h1>
<a href="/incidents/42">Current incident</a>
</article>
""");
string title = document.QuerySelector("h1")?.TextContent ?? string.Empty;
Audit generated or supplied HTML
HtmlDocumentAudit provides one reusable contract for static output checks. It reports duplicate IDs, missing document metadata, image alternatives, control names and labels, unsafe URL schemes, and heading-order problems.
HtmlDocumentAuditResult audit = HtmlDocumentAudit.Analyze(html);
foreach (HtmlDocumentAuditIssue issue in audit.Issues) {
Console.WriteLine($"{issue.Severity}: {issue.Code} - {issue.Message}");
}
The audit is diagnostic; it does not rewrite the document or claim full WCAG conformance.
For client-rendered pages, run the same contract after navigation:
await using HtmlBrowserSession session = await HtmlBrowser.OpenSessionAsync(url);
HtmlDocumentAuditResult renderedAudit = await HtmlBrowser.AuditDocumentAsync(session);
Rendered UI tests can inspect styles and attributes without creating another Playwright wrapper:
IReadOnlyDictionary<string, string> values = await HtmlBrowser.GetComputedStylesAsync(
session,
".report-panel",
new[] { "position", "padding", "overflow" });
string? label = await HtmlBrowser.GetAttributeAsync(session, "#export", "aria-label");
URL parsers stream responses with a 16 MiB default limit and cooperative cancellation. Override the bound for a specific operation when needed:
using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(30));
var document = await HtmlParser.ParseUrlWithAngleSharpAsync(
"https://example.org/status",
fetchOptions: new HtmlHttpFetchOptions { MaximumResponseBytes = 8 * 1024 * 1024 },
cancellationToken: timeout.Token);
Choose an extraction workflow
HtmlExtractionPlanner inspects page signals before you decide whether static parsing, a browserless relay, or rendered browser extraction is appropriate.
using HtmlTinkerX;
HtmlExtractionPlan plan = HtmlExtractionPlanner.Analyze(
html,
new Uri("https://example.org/status"));
Console.WriteLine($"{plan.RecommendedMode}: {plan.Confidence}");
foreach (string reason in plan.Reasons) {
Console.WriteLine(reason);
}
Crawl a bounded website scope
using HtmlTinkerX;
HtmlCrawlResult result = await HtmlCrawler.CrawlAsync(
"https://example.org/docs/",
new HtmlCrawlOptions {
MaxDepth = 2,
MaxPages = 100,
PathPrefix = "/docs/",
IncludeMarkdown = true
});
Console.WriteLine($"Fetched {result.Pages.Count} pages");
The crawler restricts requests to the starting host, honors robots.txt, and uses sitemaps by default. Review HtmlCrawlOptions before crawling sites you do not control.
See the repository for PowerShell examples, browser automation, API discovery, SSO handoff analysis, and package documentation.
HtmlTinkerX is available under the MIT License. See the LICENSE file included in the package.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
-
.NETFramework 4.7.2
- AngleSharp (>= 1.5.2)
- AngleSharp.Css (>= 1.0.0-beta.216)
- AngleSharp.Diffing (>= 1.1.1)
- AngleSharp.Js (>= 1.0.0-beta.49)
- ChartForgeX (>= 0.1.6)
- HtmlAgilityPack (>= 1.12.4)
- Jint (>= 4.8.0)
- Microsoft.Playwright (>= 1.59.0)
- NUglify (>= 1.21.17)
- OfficeIMO.Markdown.Html (>= 0.1.13)
- PreMailer.Net (>= 2.7.2)
- System.IO.Compression (>= 4.3.0)
- System.Net.Http (>= 4.3.4)
- System.Threading.Channels (>= 10.0.7)
-
net10.0
- AngleSharp (>= 1.5.2)
- AngleSharp.Css (>= 1.0.0-beta.216)
- AngleSharp.Diffing (>= 1.1.1)
- AngleSharp.Js (>= 1.0.0-beta.49)
- ChartForgeX (>= 0.1.6)
- HtmlAgilityPack (>= 1.12.4)
- Jint (>= 4.8.0)
- Microsoft.Playwright (>= 1.59.0)
- NUglify (>= 1.21.17)
- OfficeIMO.Markdown.Html (>= 0.1.13)
- PreMailer.Net (>= 2.7.2)
-
net8.0
- AngleSharp (>= 1.5.2)
- AngleSharp.Css (>= 1.0.0-beta.216)
- AngleSharp.Diffing (>= 1.1.1)
- AngleSharp.Js (>= 1.0.0-beta.49)
- ChartForgeX (>= 0.1.6)
- HtmlAgilityPack (>= 1.12.4)
- Jint (>= 4.8.0)
- Microsoft.Playwright (>= 1.59.0)
- NUglify (>= 1.21.17)
- OfficeIMO.Markdown.Html (>= 0.1.13)
- PreMailer.Net (>= 2.7.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HtmlTinkerX:
| Package | Downloads |
|---|---|
|
PowerForge.Web
PowerForge.Web static-site engine and reusable website build components. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.2.0 | 1,351 | 7/18/2026 |
| 2.0.20 | 87 | 7/18/2026 |
| 2.0.19 | 526 | 7/15/2026 |
| 2.0.18 | 430 | 7/12/2026 |
| 2.0.17 | 96 | 7/5/2026 |
| 2.0.16 | 101 | 6/23/2026 |
| 2.0.15 | 155 | 6/15/2026 |
| 2.0.14 | 110 | 6/9/2026 |
| 2.0.13 | 81 | 6/8/2026 |
| 2.0.12 | 76 | 6/8/2026 |
| 2.0.11 | 180 | 5/14/2026 |
| 2.0.10 | 86 | 5/13/2026 |
| 2.0.9 | 78 | 5/12/2026 |
| 2.0.8 | 88 | 5/10/2026 |
| 2.0.7 | 679 | 2/5/2026 |
| 2.0.6 | 6,068 | 1/2/2026 |
| 2.0.5 | 986 | 9/21/2025 |
| 2.0.1 | 228 | 9/1/2025 |
| 2.0.0 | 860 | 7/20/2025 |