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.
<PackageVersion Include="HtmlMakerKit" Version="1.0.0" />
<PackageReference Include="HtmlMakerKit" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HtmlMakerKit --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#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.
#:package HtmlMakerKit@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HtmlMakerKit&version=1.0.0
#tool nuget:?package=HtmlMakerKit&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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
| Product | Versions 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. 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- HtmlMakerKit.Core (>= 1.0.0)
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 | 549 | 6/12/2021 |