XHTML commands

You can build up an XHTML Document into a web page, or a web script in much the same way as you can build up an ordinary HTML web page. You can still use the same, PC, the same Text editor but you do need to look at the way you script, in particular the code you will use, it's slightly more involved.

Let's have a look and see.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html"; charset=utf-8" />
  5. <title> </title;
  6. </head>
  7. <body>
  8. <h1></h1>
  9. <p>
  10. </p>
  11. </body>
  12. </html>

Wow! That's a bit more complicated then basic HTML...but is it really? let's look at the script and see what we have;

1) probably the scariest looking thing here is on the first couple of lines, the DOCTYPE or <!DOCTYPE> don't worry about memorising this, few people do, just have a blank template somewhere with it all ready set to go. Basically this tells us what we're working with, and where to find the relevant information if we're not used to it

2) so now we have the xmlns attribute, this means XML NameSpace this helps define the tags within your document, not all validators do require this part, but it's better to be safe then sorry

4) Meta data tag, HTML users will recognise this, as it's been a part of HTML for a long time. This particular Meta tag describes the character set to use.

And so there you have it, using this set of data to start your first XHTML page will pretty much give you everything you need.