<p>I am developing a HTML form designer that needs to generate static HTML and show this to the user. I keep writing ugly code like this:</p>

<pre><code>public string GetCheckboxHtml()
{
    return ("&amp;lt;input type="checkbox" name="somename" /&amp;gt;");
}
</code></pre>

<p>Isn't there a set of strongly typed classes that describe html elements and allow me to write code like this instead:</p>

<pre><code>var checkbox = new HtmlCheckbox(attributes);
return checkbox.Html();
</code></pre>

<p>I just can't think of the correct namespace to look for this or the correct search term to use in Google.</p>

One option is to use
XElement
functional construction
. See
this blog post
for an example calendar generator.
In your case, your Html could be generated with:
```
```
var input = new XElement("input",
    new XAttribute("type", "checkbox"),
    new XAttribute("name", "somename"));

return input.ToString();
```
```