XHTML Basic Tutorial

Introduction to XHTML

Use XHTML to define the basic contents of a web page. XHTML is an alternative to HTML with a much stricter syntax. The Web Standards Project states that XHTML is "ready for the future" and "easier to learn".

Example

HTML

Html:
  1. <P>
  2. This is the text.<BR>
  3. I am regular HTML<BR>
  4. </p>

Notice in the HTML how everything is capitalized, and there is one tag that isn't capitalized. In HTML, some tags need to be close, some do not and there is no standard for capitalization of tags.

XHTML

Html:
  1. <p>
  2. I am XHTML<br />
  3. I am shiny!!<br />
  4. </p>

XHTML is consistent.Every tag is closed by a forward slash. Everything is also lower case.

XHTML Starter Kit

When viewing the starter kit, right click and select 'view page source' to see the XHTML.

View the XHTML starter kit example pages

Download the XHTML Starter Kit

Furthur Reading

View the source of this webpage, it is XHTML. Right click anywhere and choose 'View Page Source'.

XHTML at W3 Schools

HTML versus XHTML - The Web Standards Project