Skip to content

Simpiwe/Mason.FluentHtml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mason.FluentHtml

Mason.FluentHtml is a simple, unambitious library for building HTML documents in a fluent manner.

Getting Started

using Mason.FluentHtml;

HtmlBuilder htmlBuilder = new HtmlBuilder();

htmlBuilder.Table(new { @class = "table-primary" }, table =>
{
    table.Tbody(tbody =>
    {
        tbody.Tr(tr =>
        {
            tr.Td(td => td.Content("Cell 1"));
            tr.Td(td => td.Content("Cell 2"));
        });
    });
});

string html = htmlBuilder.ToString(); //<table class="table-primary"><tbody><tr><td>Cell 1</td><td>Cell 2</td></tr></tbody></table>

This example shows how to use Mason.FluentHtml to build a basic HTML table.

Features

  • Fluent Interface: Build HTML documents with a natural and intuitive syntax.
  • No Dependencies: The library has no external dependencies and is designed to be lightweight.
  • Target Framework: Mason.FluentHtml targets .NET Standard 2.0, ensuring compatibility across various platforms.

Installation

To install Mason.FluentHtml, you can use the following NuGet command:

dotnet add package Mason.FluentHtml

License

Mason.FluentHtml is licensed under the GNU General Public License v3.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages