For example, the following WML page could be saved as "example.wml":
This is a sample WML page.
Wireless Markup Language is a lot like HTML (Hyper Text Markup Language) in that it provides navigational support, data input, hyperlinks, text and image presentation, and forms. A WML document is known as a “deck”. Data in the deck is structured into one or more “cards” (pages) – each of which represents a single interaction with the user. The introduction of the terms "deck" and "card" into the internet and mobile phone communities was a result of the user interface software and its interaction with wireless communications services having to comply with the requirements of the laws of two or more nations.
WML decks are stored on an ordinary web server trivially configured to serve the text/vnd.wap.wml MIME type in addition to plain HTML and variants. The WML cards when requested by a device are accessed by a bridge WAP gateway, which sits between mobile devices and the World Wide Web, passing pages from one to the other much like a proxy. The gateways radio the WML pages in a form suitable for mobile device reception. This process is hidden from the phone, so it may access the page in the same way as a browser accesses HTML, using a URL (for example, http://example.com/foo.wml), provided the mobile phone operator has not specifically locked the phone to prevent access of user-specified URLs.
WML has a scaled down set of procedural elements which can be used by the author to control navigation to other cards.
It is an error and misconception to think of WML as a pinhole view of the Internet. The real magic and value of WML is that it provides an interface with the phone hardware to initiate a call based on web content requested by user query, for example the telephone number of a taxi servicing your zip code:
Call A Taxi:
Mobile devices are moving towards support for greater amounts of XHTML and even standard HTML as processing power in handsets increases. These standards are concerned with formatting and presentation. They do not however address cell-phone or mobile device hardware interfacing.
WML can be a very powerful and effective cell-phone add on. It lets you for example enter a zip code, and obtain a list of clickable phone numbers of pizza parlors and taxicabs in your immediate location.