- What Is HTML?
- Enter XML
- Transitioning from HTML to XHTML
- Choosing Between XML, HTML, and XHTML
- About this Article
Choosing Between XML, HTML, and XHTML
The "best" markup method usually depends on the project. Most designers focus on HTML or XHTML. Because many companies are committed to HTML and have not yet considered XHTML, using HTML 4.01 is perfectly acceptable. If you choose HTML 4, however, use and advocate the use of standard practices: Adhere to HTML syntactical rules and validate pages. This way, you stick with the familiar HTML and still conform to standardized methods.
At close study, there's little difference in the DTDs found in HTML 4 and XHTML 1.0. So if you're just starting to write web pages, or have the opportunity to try out XHTML 1.0, do so. I wouldn't, however, recommend changing large sites from HTML to XHTML. The more important issue is to adhere to the standard and validate those documents.
What about XML? For advanced web development applications that need to keep data extremely organized, XML comes in handy. But for web designers, XML itself is not an ideal way to create documents for a web browser or other user agent. However, XML applications, such as SVG, SMIL, or WML, are beginning to have an impact on the way web designers work.
Whichever method you choose, the bottom line is that you use recommended markup rather than arbitrary markup. This is especially important when you move from HTML into the realm of XML and beyond. If you don't know the standard, you run the risk of making mistakes, such as introducing proprietary or even nonexistent markup into a document. If you then try to share that document with another colleague or company, significant, time-consuming problems can ensue it's better to follow the W3C's recommendations and encourage other developers to do so.