1. Home
  2. Computing & Technology
  3. Web Design / HTML

You Already Write for Cell Phones
XHTML Basic is Becoming the Standard for Small Devices

By , About.com Guide

Instead of having to learn a new markup language, such as Wireless Markup Language (WML), Handheld Device Markup Language (HDML), or CompactHTML (CHTML), now you only need to use XHTML Basic. And XHTML Basic really isn't new.

As the W3C says "HTML 4 is a powerful language for authoring Web content, but its design does not take into consideration issues pertinent to small devices...". XHTML Basic provides us with a document type that can be shared across various devices (desktops, TV, or mobile phones). It can be used for simple content authoring - so one document can be used for all of these devices.

XHTML Basic is a simplified version of HTML 4.0 which has been rewritten to conform to XML rules. Convert your HTML 4.0 documents to XHTML 1.0 using the following steps:

  1. make sure that all your tags are nested correctly
    ie. if you put a bold tag and then italic, close the italic before you close the bold: <b><i>bold and italic</i></b>
  2. convert all your tags to lowercase
    XHTML is case-sensitive
  3. include all end tags, and close singleton tags
    ie. <p></p> and <br />
  4. quote all your attributes
    ie. <img src="image" />

What XHTML Basic Is

To convert your XHTML to XHTML Basic, you have to make sure that it doesn't include any elements that are not part of the following XHTML modules:

What XHTML Basic Isn't

  • style element
    If you need to use CSS, you should use external style sheets with the link element
  • script and noscript elements
    most small devices have limited memory, and scripting may not be supported
  • frames
    frames depend upon a screen interface that may or may not be present in a small device

If you don't have a small device that uses XHTML Basic, don't worry, they will be around soon. The WAP forum announced that they will be replacing WML with XHTML Basic with the next major revision of WAP. CHTML and HDML are also converging towards XHTML. Therefore, simply because you know XHTML, you will be writing for handheld devices sooner than you think.

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. About.com Web Design A to Z
  5. Web Design Articles R-Z
  6. Web Design/HTML Articles Y
  7. You Already Write for Cell Phones - XHTML Basic>

©2009 About.com, a part of The New York Times Company.

All rights reserved.