HtmlMakerKit.Core
1.0.0
dotnet add package HtmlMakerKit.Core --version 1.0.0
NuGet\Install-Package HtmlMakerKit.Core -Version 1.0.0
<PackageReference Include="HtmlMakerKit.Core" Version="1.0.0" />
paket add HtmlMakerKit.Core --version 1.0.0
#r "nuget: HtmlMakerKit.Core, 1.0.0"
// Install HtmlMakerKit.Core as a Cake Addin #addin nuget:?package=HtmlMakerKit.Core&version=1.0.0 // Install HtmlMakerKit.Core as a Cake Tool #tool nuget:?package=HtmlMakerKit.Core&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
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. |
-
net5.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on HtmlMakerKit.Core:
Package | Downloads |
---|---|
HtmlMakerKit
Set of tools for dynamically creating html elements in C# code |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 406 | 6/12/2021 |