https://github.com/jchristn/htmlpagebuilder
Simple library that allows you to build HTML strings including head and body components
https://github.com/jchristn/htmlpagebuilder
builder html page web
Last synced: 4 months ago
JSON representation
Simple library that allows you to build HTML strings including head and body components
- Host: GitHub
- URL: https://github.com/jchristn/htmlpagebuilder
- Owner: jchristn
- License: mit
- Created: 2021-01-14T16:57:27.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T22:24:22.000Z (over 1 year ago)
- Last Synced: 2025-04-24T00:08:23.016Z (about 1 year ago)
- Topics: builder, html, page, web
- Language: C#
- Homepage:
- Size: 2.08 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# HtmlPageBuilder
[](https://www.nuget.org/packages/HtmlPageBuilder/) [](https://www.nuget.org/packages/HtmlPageBuilder)
## Description
HtmlPageBuilder is a simple library that allows you to build HTML strings including head and body components.
For a sample app exercising this library, refer to the ```Test``` project contained within the solution.
## New in v1.0.0
- Initial release
## Simple Example
```csharp
HtmlPage p = new HtmlPage();
p.Head.Title = "My Page";
p.Head.MetaKeywords = "my,page";
p.Head.Style = "h1 { font-family: 'arial' } p { font-family: 'arial' } ul { font-family: 'arial' }";
p.Body.Content += _Page.Body.H1Text("My Page");
p.Body.Content += _Page.Body.Paragraph("This is some sample text.");
p.Body.Content += _Page.Body.UnorderedList(new List { "foo", "bar", "baz" });
Console.WriteLine(p.ToString());
```
## Version history
Refer to CHANGELOG.md.