Wireless Markup Language / WML Tutorial

WML (Wireless Markup Language) is the first markup language standard for wireless devices. It is supported by all the major mobile phone manufacturers. At the beginning of this WML tutorial, you can learn about the basics of WML, such as the deck and card concept, WML's document structure and syntax, etc. Then topics like font styles, images, tables, anchor links and softkeys will be covered. After that we will move on to more advanced topics of WML like events, input elements, variables, and the submission of form data to the server. Plenty of code examples are given in the WML tutorial to help you understand the concepts and techniques.


Table of Contents

1. WML (Wireless Markup Language) Introduction

1.1. What is WML 1.x?

1.2. WAP 2.0

1.3. WML 2.0

2. WML Deck and Card

3. WML Document Structure

3.1. Hello World WML Example

3.2. Prolog

3.3. XML Declaration and Character Encoding

3.4. DOCTYPE Declaration

3.5. <wml> Element

3.6. <card> Element

3.7. <p> Element

4. WML Generic Metadata: <meta>

4.1. WML Cache Control: Setting Expiry Period of a WML File

5. Comments in WML

6. Line Breaking in WML

7. Font Size and Style in WML

8. WML Preformatted Text: <pre>

9. WML Images

9.1. Wireless Bitmap (WBMP)

9.2. Can a WML Browser Display Color Images?

9.3. Displaying an Image in WML: <img>

9.4. Issues Concerning Large Images in WML

10. WML Tables

11. WML Anchor Links

11.1. Going to a Card in Another Deck

11.2. Going to a Card in the Current Deck

11.3. <a> Element

11.4. Going Backwards

11.5. Using a Short URL for the Home Page of a WML Site

11.6. WML Image Links

12. Programming Softkeys of Mobile Phones and the <do> Element

13. WML Template and Menu

14. WML Events and the <onevent> Tag

15. Timer and the ontimer Event

16. WML Event: onenterbackward

17. WML Event: onenterforward

18. WML Selection Lists and the onpick Event

18.1. Creating Selection Lists (Radio Buttons): <select><option>

18.2. Selecting Multiple Options (Check Boxes)

18.3. Organizing Options into Groups: <optgroup>

18.4. WML Event: onpick

19. WML Input Fields

19.1. WML Password Input Fields

19.2. Controlling the Type and Number of Characters to be Entered in Input Fields (format Attribute)

19.3. Controlling Whether Input Fields can be Left Empty (emptyok Attribute)

20. WML Variables

20.1. Setting Variable Values in WML

20.1.1. Using the <setvar/> Tag

20.1.2. Using Data Collection Tags <select> and <input/>

20.1.3. Using the setVar() Function of WMLScript's WMLBrowser Standard Library

20.2. Referring to the Value of a Variable in WML

20.3. The $ Character in WML

20.4. Clearing Variable Values (Passwords and Personal Data)

20.4.1. The newcontext Attribute

21. Submitting Form Data to the Server in WML

21.1. At the Server-side

21.1.1. ASP Version

21.1.2. JSP Version

21.1.3. PHP Version

21.2. Posting Data When an Event Occurs

22. Clearing a Saved Form in WML

22.1. Reset Buttons



A button for going back to the top of this page