Skip navigation

Category Archives: HTMLTools

Today, as I was coding away at one of my projects, I found myself writing the same code as I had written before, the code in question was producing a couple of html pages.

So I decided to turn it into a .NET  library, 20 minutes later [the imaginatively named] HTMLTools was born.

As with most of my personal projects, It has no XML documentation, it should be easy enough to understand and work with. To produce a simple web page with a heading, this is what you would write:

using Josh.HTMLTools.HTMLGeneration;

class Program
{
static void Main(string[] args)
{
List<IHtmlElement> elements = new List<IHtmlElement>();

elements.Add(new GenericHtmlElement(“h1”, “Hello world”));

HtmlPage page = new HtmlPage(“test”, elements);

page.SavePage(“Test.html”);
}

This will also save the page as Test.html in your program’s working directory.

here is the download link.

(yes I do realise that SingleTagElementType is completely random and has no use, I was planning to implement a feature that I decided to leave out for this release, after I uploaded it to Assembla)

as with most of my programs, you are free to do whatever with it, just give me some credit if possible.

If you have any questions or anything, feel free to leave a comment or send me an email (jhektor %at% gmail _dot com)