public static string MakeIntoHtml5Page(string pageTitle, params FluentTagBuilder[] bodyContent) { FluentTagBuilder html = new FluentTagBuilder("html").AddChild(new FluentTagBuilder("head").AddChild(new FluentTagBuilder("title").WithText(pageTitle)) .AddChild(new FluentTagBuilder("meta") { RenderMode = TagRenderMode.SelfClosing }.WithAttribute("http-equiv", "content-type").WithAttribute("content", "text/html;charset=utf-8"))) .AddChild(new FluentTagBuilder("body", bodyContent)); return "<!DOCTYPE html>" + html.ToString(); }
public static string MakeIntoHtml5Page(string pageTitle, params FluentTagBuilder[] bodyContent) { FluentTagBuilder html = new FluentTagBuilder("html").AddChild(new FluentTagBuilder("head").AddChild(new FluentTagBuilder("title").WithText(pageTitle)) .AddChild(new FluentTagBuilder("meta") { RenderMode = TagRenderMode.SelfClosing }.WithAttribute("http-equiv", "content-type").WithAttribute("content", "text/html;charset=utf-8"))) .AddChild(new FluentTagBuilder("body", bodyContent)); return("<!DOCTYPE html>" + html.ToString()); }