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!

Code samples from my ADNUG talk – Coding with Conventions
An opportunity for a viable .NET open source ecosystem

Comments

Commenting is closed.

Chad Myers May 22, 2011

 Awesome!!! Great job folks, and thanks Sharon

scichelli May 23, 2011

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.

Mattio May 24, 2011

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 Jun 1, 2011

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

Jamil hallal Jun 2, 2011

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?

joshuaflanaganauthor Jun 2, 2011

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.

Rais Hussain Jun 2, 2011

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

Is there a complete reference book in pfd form available?

joshuaflanaganauthor Jun 2, 2011

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.