// build the <body> element public void BuildBody(string textIn) { // add a top-level heading containing the title doc.AppendToBody(new HtmlHeading(1, title)); // add a second-level heading containing the author doc.AppendToBody(new HtmlHeading(2, "by " + author)); // add a paragraph containing the text doc.AppendToBody(new HtmlParagraph(textIn)); }