Announcing HtmlTags 1.0

I’m pleased to announce the release of version 1.0 of the HtmlTags library. You can add it to your projects today using nuget.

> Install-Package HtmlTags

HtmlTags provides a simple object model for generating HTML from .NET code. The main premise is that you are much better off building a model of the HTML elements you want to produce (and serializing it to a string when needed), rather than building a string directly. It was created by Jeremy Miller as part of FubuMVC to support the awesome conventional HTML features I’ve talked about before. I then pulled it out of FubuMVC and tightened up the API for a more general release. I strongly believe that regardless of which .NET web framework you are using, if you are generating snippets of HTML (think ASP.NET MVC HtmlHelper extensions), you should use HtmlTags.

Check out the readme for an overview and example usage of HtmlTags.

Big thanks to Sharon Cichelli for helping me put the final touches on the codebase for the 1.0 release, and to Robert Greyling for the sharp new logo!

This entry was posted in fubumvc. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  •  Awesome!!! Great job folks, and thanks Sharon

  • Anonymous

    Big thanks to Josh for being so welcoming and supportive in my first contribution to an OSS project. Also, HtmlTags is neat;  check it out.

  • Anonymous

    Great News for all . yeah really informative..

  • Just yesterday I was looking at some ugly code of mine that is generating HTML with string.Format. I can’t wait to try this out instead.

  • Stacey Cielia Lynn

    Nice. Is it possible to get the unobtrusive javascript validation metadata through these and write out our own html tags in MVC?

  • This is good, do we need to add any additional configuration tags in the web.config?
    can you specify more details about the life cycle of this tags? at which event of the page life cycle the HtmlTags are manipulated?

    • Anonymous

      HtmlTags does not require any configuration in your web.config. You invoke HtmlTags in script blocks in your view template. If you are using ASP.NET WebForms, I believe the code will run during the Render event.

  • Thank you for providing a resourceful library. Kindly can you provide documentation with examples?

    Is there a complete reference book in pfd form available?

    • Anonymous

      Sorry, there is no complete reference document yet. The readme linked at the end of the most has a number of examples, and the unit tests in the source cover all of the APIs.