Skip to content

Instantly share code, notes, and snippets.

@einarwh
Created February 27, 2013 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save einarwh/5052367 to your computer and use it in GitHub Desktop.
Save einarwh/5052367 to your computer and use it in GitHub Desktop.
HTML DSL using using.
public override void Write()
{
using(Html())
{
using (Head())
{
using (Title())
{
Text("Greeting");
}
}
using (Body(Bgcolor("pink")))
{
using(P(Style("font-size:large")))
{
Text("Hello world!");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment