1. WML (Wireless Markup Language) Introduction


1.1. What is WML 1.x?

WML (Wireless Markup Language) 1.x is the markup language defined in the WAP 1.x specification. WAP is the standard created by the WAP Forum (now the Open Mobile Alliance [OMA]) that brings the World Wide Web to wireless devices. It specifies the protocol stack and application environment of mobile Internet browsing applications.

The role of WML in mobile Internet applications is the same as that of HTML in web applications. WAP sites are written in WML, while web sites are written in HTML.

WML 1.x is very similar to HTML. Both of them use tags and are written in plain text format. Some tags in WML 1.x are directly borrowed from HTML. If you have experience in using the HTML markup language, you should be able to learn WML 1.x quickly.

Some features of WML 1.x are specific to wireless devices. For example, WML 1.x provides a way for developers to program the softkeys of mobile phones. This feature is not supported in HTML since computers do not have any softkeys.

The most up-to-date version of the WAP 1.x specification is WAP 1.2.1, which defines WML 1.3.

WML files have the extension ".wml". The MIME type of WML is "text/vnd.wap.wml".

WML supports client-side scripting. The scripting language supported is called WMLScript. Its syntax is based on JavaScript. If you want to learn it, our WMLScript tutorial will be a good starting point for you.


1.2. WAP 2.0

WAP 1.x is an earlier version of the WAP standard. The most current version is WAP 2.0. The markup language defined in WAP 2.0 is XHTML MP (XHTML Mobile Profile). It is a subset of the XHTML used on the web. XHTML MP supports a mobile version of cascading style sheet called WCSS (WAP CSS). It is a subset of the CSS2 used on the web plus some WAP specific extensions.

Most of the new mobile phone models released are WAP 2.0-enabled. As WAP 2.0 is backward compatible to WAP 1.x, WAP 2.0-enabled mobile devices can display both XHTML MP and WML documents.

WML 1.x is an earlier technology. However, that does not mean it is of no use, since a lot of wireless devices that only supports WML 1.x are still being used. Besides, some useful features of WML are not available in XHTML MP. For example, XHTML MP does not support events, variables and client-side scripting. The major WML features lost in XHTML MP are discussed in the "WML Features Lost in XHTML MP" section of our XHTML MP tutorial.

If you write the markup of your mobile Internet site in WML, both old and new WAP-enabled wireless devices can be used to view your mobile Internet site. The user base of your WAP application is maximized.


1.3. WML 2.0

WAP site developers need not to care about WML 2.0. WML 2.0 is created for backward compatibility purposes and it is not for use by WAP site developers. To develop a WAP site with the WAP 2.0 standard, use XHTML Mobile Profile.


Page 1 of 50 Next Page


Feedback Form (ExpandCollapse)

What do you think about this web page?






(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page