Frequently Asked Questions
Common questions about HtmlForgeX and HtmlForgeX.Email.
General
What is HtmlForgeX?
HtmlForgeX is a .NET library that simplifies HTML/CSS/JavaScript generation through a fluent API. It enables creating complex HTML documents, pages, and reports without requiring HTML/CSS/JS knowledge. The core principle is that users should never need to write raw HTML, CSS class names, or style strings.
What's the difference between HtmlForgeX and HtmlForgeX.Email?
HtmlForgeX generates full HTML documents for browsers — dashboards, reports, data visualizations. It uses external CSS/JS libraries like Tabler, ApexCharts, DataTables, and Bootstrap.
HtmlForgeX.Email generates email-client-safe HTML with inline styling, Outlook VML fallbacks, and XHTML 1.0 Strict compliance. It includes 127+ typed components specifically designed for email rendering.
Do I need to know HTML or CSS?
No. HtmlForgeX exists specifically so you don't have to. Every visual element is a typed C# class, every style option is an enum, and every layout choice uses fluent methods. You work entirely in C# with IntelliSense guiding you.
Which .NET versions are supported?
HtmlForgeX targets multiple frameworks:
- .NET 8.0 — Modern runtime with full feature support
- .NET Framework 4.7.2 — For legacy Windows applications
- .NET Standard 2.0 — Cross-platform compatibility
Is HtmlForgeX free?
Yes. Both HtmlForgeX and HtmlForgeX.Email are open source under the MIT License. Free for commercial and non-commercial use.
Features
How does offline mode work?
HtmlForgeX supports three library modes:
- Online — Links to CDN resources (requires internet)
- Offline — Embeds all CSS/JS inline in a single HTML file (fully self-contained)
- OfflineWithFiles — Creates separate CSS/JS files alongside the HTML
Can I use it in PowerShell?
Yes. HtmlForgeX includes a PowerShell module that you can install via Install-Module HtmlForgeX. It supports PSObject for table generation and works in both Windows PowerShell 5.1 and PowerShell Core.
Does it work with ASP.NET Core?
Yes. The HtmlForgeX.AspNetCore package provides integration with antiforgery tokens, upload progress tracking, and embedded asset middleware.
Does HtmlForgeX.Email support dark mode?
Yes. HtmlForgeX.Email uses @media (prefers-color-scheme: dark) with stable hfx-* class hooks, semantic color tokens, and image dark-mode swapping. It includes Outlook.com-specific selectors for maximum client compatibility.
Troubleshooting
Where can I get help?
For questions, bug reports, or feature requests, please open an issue on the GitHub repository. For documentation, see the Documentation section.