XHTML was developed by the W3C. This article is presented from the perspective of a web developer and is simplified greatly. If you want an “official” or more in-depth (thus more heavy reading) be sure to check out the W3C’s tutorials and documentation concerning XHTML.
Before you begin, you should be reasonably familiar with HTML and CSS and have a general understanding of the Internet and its principles. XHTML is based very closely on HTML.
This new version of HTML is very easy to pick up and can generally be learnt and fully comprehended in a matter of a few hours. Do not be afraid of learning XHTML! It is very straight forward!
XHTML is a reformulation of HTML 4.01 with XML
XHTML stands for Extensible HyperText Markup Language and is a reformualtion of HTML 4.01 with XML 1.0.
This means that HTML 4.01 has been redesigned with XML.
The new standard for web documents
HTML is the foundation of formatting documents on the Web and is considered the lingua franca of the Internet. HTML can be hand coded with simple text editors or written with the aid of a HTML Editor, such as Dreamweaver, to speed up the process.
HTML is the building block of web pages. Everything starts and is based around this simple markup language.
XHTML is the newest version of HTML and will eventually replace HTML 4.01. XHTML is based on HTML and relies on it for definitions of tags. IE, the XHTML Documentation does not decribe the properties of the BR tag, rather, you will need to look in the HTML documentation for a description of the BR tag.
Includes many features of XML
XHTML is classified as an XML Application. Thus many features of XML are included in it. XHTML has more powerfull support for XML technologies. The biggest difference between XHTML and HTML is a stricter syntax, as you will discover in the following chapters.
An official W3C recommendation
XHTML is a W3C Recommendation. This means that it is a standard language and is supported by all recent browsers. The World Wide Web Consortuim is a forum of many companies, developers and organisations, headed by Tim Berners-Lee that work together to “lead the web to its full potential”. They are involved in many projects for developing the Internet’s technologies.
XHTML is neater – it is stricter and cleaner than its predecessor.
Errors are not allowed
An XML Application always has perfect, neat, easy to read syntax. If just one thing is wrong, the XML Application terminates. Automatic error correction still occurs in browsers if malformed XHTML is sent with a content type of text/html. However, this content type is not allowed for XHTML 1.1 and onward. This article wont delve into this matter further.
Will work on all machines
The Internet is a myriad of web pages, some of them consist of hoplessly malformed HTML code that may work sometimes, and other times crash. XML is a language that must be well formed (ie: correct accoring to the specifications), thus standards are maintained and your web page will work on all machines.
Will display correctly on all machines
Another advantage of your code being well formed and valid it that it has a higher possibility that it will display correctly on all machines. With HTML, if you made a mistake in your code, a browser such as Internet Explorer will be able to overcome the error. The downside of this automatic recovery is that some browsers may not be capable of overcoming the error. This means that your website may work in Internet Explorer, but look terrible in Netscape.
To prove my point of Internet Explorer being able to recover from bad code, take a look at the in action. It works perfectly, even though it shouldn’t. In XML, everything must be marked up correctly without error and since XHTML is a reformualtion of HTML 4.01 with XML, it also applies to XHTML.
Not supported by old browsers
One downside is that some older browsers may struggle to read XHTML as it is a new language compared to HTML. This is a risk to accept with any new technology. If your website is attracting users with outdated software, it probably might not be worth switching to XHTML right away. The fact is, you can continue using HTML 4.01 until you have grandchildren, as HTML 4.01 is a W3C Standard that will remain over the years to come.