The basic page
The code for a basic page is the same regardless of what you want to put on the page. There are a few elements that need to be included each and every time you make a page, and the code below explains:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Example web page</title> </head> <body> Contents of page go here </body> </html>
Whenever you make a page, you can start by using the above as a template. Notice that the XHTML document is split up into a head and body section and that the main part of the document is enclosed within an html element. These will be explained later, but next we will concentrate on the Doctype.