Wap/WML : First WML Page
Jean-Michel Blanchard
Declaring a WML deck
WML is similar to HTML, except that it is based on the XML 1.0 specification. In order to be recognised by WAP browsers or
cellular phones, WML documents must begin with a specific declaration. This declaration, often forgotten in HTML, is essential
here. This is what it looks like:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http:///www.wapforum.org/DTD/wml_1.1.xml">
These two tags indicate to the browser the rules that the document follows. The
<!DOCTYPE> tag specifies the document type and the WML standard (here, version 1.1.) that are used by the deck.
Jargon. A WML document or page is called a
deck. So if you use a WAP-dedicated editor, you will certainly see a command labelled New WML Deck instead of New Document or
New Page.
Another firm rule: all contents to be displayed have to be included between the
<wml> and
</wml> tags. They tell the browser where all the contents to be displayed are located, such as the
<html> and
</html> tags in HTML documents.
Write in small letters! To avoid misinterpretation by WAP browsers, always write your instructions in lower case letters.