startDocument(); $html->startHead(); $html->addTitle('Page Title'); $html->endHead(); $html->startBody(); $html->addContent('Hello World!
'); $html->endBody(); $html->endDocument(); echo $html->getContent();
startDocument(); $html->startForm('post', 'submit.php'); $html->addLabel('username', 'Username:'); $html->addInput('text', 'username'); $html->addLabel('password', 'Password:'); $html->addInput('password', 'password'); $html->addButton('submit', 'Login'); $html->endForm(); $html->endDocument(); echo $html->getContent();This example shows how to use HTML Writer to create a form with input fields and a submit button. Package/Library: HtmlWriter