AgileDotNetHtml 1.0.0

There is a newer version of this package available.
See the version list below for details.
Install-Package AgileDotNetHtml -Version 1.0.0
dotnet add package AgileDotNetHtml --version 1.0.0
<PackageReference Include="AgileDotNetHtml" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AgileDotNetHtml --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AgileDotNetHtml, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install AgileDotNetHtml as a Cake Addin
#addin nuget:?package=AgileDotNetHtml&version=1.0.0

// Install AgileDotNetHtml as a Cake Tool
#tool nuget:?package=AgileDotNetHtml&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Agile Dot Net Html

Table of Contents


I believe that have many great libraries for working whit HTML in C#, but here is a good alternative. AgileDotNetHtml is a library that gives features as parsing and building HTML. The library allow you convert HTML to C# objects represent this HTML and Build these object to HTML string again. There is a rich set of C# object which represent HTML elements and their attributes by w3 school HTML 5 standard. The idea of this project is to allow you fast and easy create and edit composite HTML structures.

Getting Started

Parse Page

  • Load and parse page from specific url.
	HtmlParser parser = new HtmlParser();
	HtmlDocument documnet = parser.ParsePageFromUrl(path);

Parse String

  • Parse specific HTML string
	string htmlString = "<div class='some element'><ul class='ul'><li></li><li></li></ul></div>";
	HtmlParser parser = new HtmlParser();		
	IHtmlElementsCollection elements =  parser.ParseString(htmlString);

Build Html Content

  • Create HTML content containing form elements whit different kinds of inputs.
	HtmlFormElement formElement = new HtmlFormElement();
	HtmlInputElement textInput = new HtmlInputElement("text");
	textInput.Name = "TextInput";
	textInput.Value = "Some value";
	HtmlInputElement radioInput = new HtmlInputElement("radio");
	radioInput.Name = "RadioInput";
	radioInput.Value = "Some value";

	HtmlTextareaElement textArea = new HtmlTextareaElement();
	textArea.Name = "TextArea";
	textArea.Text("Some text...");


	HtmlBuilder builder = new HtmlBuilder();
	IHtmlContent formHtmlContent = builder.CreateHtmlContent(formElement);


Atanas Galchov


AgileDotNetHtml is open source software licensed as MIT

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 178 5/8/2021
1.0.2 92 4/27/2021
1.0.1 91 4/20/2021
1.0.0 80 4/20/2021