I realize that some of you are new to HTML design and an
introduction to WML may be a bit premature. Even so, WML is a
closely related technology that is only going to gain in prominence
over the next few years. Whether or not you are ready to try your
hand at WML, a basic knowledge and understanding of how WAP
works is bound to be a benefit to you at some time in the near future.
Coding WML is very similar to coding HTML and in many instances
the tags are the same. WML however, is far stricter in its format than
HTML. Any minor deviation from the standard will cause problems.
The Nokia simulator is a standard HTML text editor that exports to a
simulated cell phone. I have posted a screen shot at: http://www.imswebtips.com/is36fig1.htm for those of you who have
not yet looked at it. With a little practice you should not have much
trouble learning how to use it. After typing the WML code into the
editor, you can Compile and Show to view the results in the cell
What does WML look like?
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
<card id="card1" title="Welcome">
Welcome to the Virtual Mechanics WAP home-site.
<i> For all your WAP needs<br/></i>
This is the example I used to create the screen shot. The first two
lines are standard in all WML files. For those of you that are familiar
with it, you will note that the first line identifies the WML file as a
form of XML. The second line identifies the version of WML that is
The main WML code is surrounded by <wml> </wml> tags the same
way that HTML is surrounded by <html> </html> tags. Within the
code are two permissible sections. The first section is <template>
</template> which describes the layout of buttons that are common
to all cards.
The second section contains the cards surrounded by the card tags
<card> </card>. The above example only contains one card but in
fact you can have as many as you like within the deck. Text must be
imbedded with the paragraph tags <p> </p> and can be formatted
with many of the same tags that are used in HTML such as: bold
<b></b>, italic <i></i> and underline <u></u>. Although many tags
are similar to HTML tags, you cannot count on all HTML tags being
available or even identical when they are available.
In WML all tags must be closed. In HTML it is acceptable to have a
single paragraph tag <p> but in WML a paragraph must be closed
with the </p> tag before another <p> tag is used. Failure to do so or
to attempt to enter text outside of a paragraph will cause an error.
When a tag has no logical closing tag, it must be closed within the
tag. The image tag for example, is almost identical to the HTML
equivalent except that it is closed with the tag with a final backslash.
An example is: <img src='mypic.wbmp' alt='My Pic'/>
That's about it as a brief introduction to WML and WAP. Obviously
there is a lot more that you will need to learn and research before you
can be proficient with its use. For more information and links start with: