HtmlMakerKit 1.0.0

dotnet add package HtmlMakerKit --version 1.0.0
NuGet\Install-Package HtmlMakerKit -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HtmlMakerKit" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HtmlMakerKit --version 1.0.0
#r "nuget: HtmlMakerKit, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HtmlMakerKit as a Cake Addin
#addin nuget:?package=HtmlMakerKit&version=1.0.0

// Install HtmlMakerKit as a Cake Tool
#tool nuget:?package=HtmlMakerKit&version=1.0.0

HtmlMakerKit

Set of tools that helps creating html elements dynamically in C# code with modifying

Installation

Install the standard Nuget packages into your C# project:

HtmlMakerKit for all set of tools.

HtmlMakerKit.Core for tools targeted on creating html elements in general.

Compatibility

Project .NET version
HtmlMakerKit 5.0
HtmlMakerKit.Core 5.0

Usage

For details visit Wiki

HtmlMakerKit.Core:
HtmlElement html = HtmlElement.New("html").AddChildren(
	HtmlElement.New("head").AddChildren(
		HtmlElement.New("title").SetInnerHTML("My website!"),
		HtmlElement.New("link").AddAttibutes(
			("rel", "stylesheet"),
			("href", "http://example.org/style.css")
			),
		HtmlElement.New("style").SetInnerHTML(
			"body{color:black;} p{font-size:1.1em;} .title{color:blue;}"
			)
		),
	HtmlElement.New("body").AddChildren(
		HtmlElement.New("h1")
			.AddAttibutes(("class", "title"))
			.SetInnerHTML("Mega welcome on my website!"),
		HtmlElement.New("p").SetInnerHTML("Lorem ipsum dotor amar"),
		HtmlElement.New("script").SetInnerHTML(
			"function job(){console.log(\"bar\");"
			)
		)
	);

will produce:

<html>
	<head>
		<title>My website!</title>
		<link rel="stylesheet" href="http://example.org/style.css"/>
		<style>
			body{
				color:black;
			} 
			p{
				font-size:1.1em;
			} 
			.title{
				color:blue;
			}			
		</style>
	</head>
	<body>
		<h1 class="title">Mega welcome on my website!</h1>
		<p>Lorem ipsum dotor amar</p>
		<script>
			function job(){console.log("bar");
		</script>
	</body>
</html>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0 324 6/12/2021