previousHTML_Page2 (Previous) (Next) Headersnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Creation

Creation – Making a new page

Description

A HTML page is created by instantiating a new HTML_Page2 object. While you may pass an array of attributes to the constructor, it isn't required since the default settings are fairly intuitive.

  • Unix line endings (\n)

  • UTF-8 charset

  • text/html MIME type

  • XHTML 1.0 Transitional doctype

  • English language

If you don't like these settings, you can either pass an array of settings to the constructor or use setter methods such as setDoctype(), setMimeEncoding() or setCharset() .

Creating a HTML page

<?php
require_once 'HTML/Page2.php';
$page = new HTML_Page2();
$page->setTitle('My first HTML page');
$page->addBodyContent('<h1>Hello!</h1>');
$page->display();
?>
previousHTML_Page2 (Previous) (Next) Headersnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.