An example for a WML (Wireless Markup Language)program
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="Card1" title="Wap-UK.com">
<p>
<!-- Hello World example -->
Hello World
</p>
</card>
</wml>
Now, lets explain what each tag does. The first two lines are required for all WML pages. It simply defines what kind of document (which is WML 1.0) to the browser. If you don't know what those mean, it doesn't matter. Just include it in every WML pages.
Here are the definition for tags:
Tag | Definition |
<wml> </wml> |
It defines the beginning and the ending of the page, like
<html> </html>. |
<card> </card> |
It defines the beginning and the ending of the card. WML pages are organized in decks and cards. A deck is a collection of cards, and cards are the basic unit of a WML page. Like a website consists of a lot of html pages and that html page is the basic unit.
The id identifies this card in the deck. It has to be unique for each card in the deck. It is used to referred to this card by other cards.
The title gives the user some information about this page. It is up to the device of how to interpret this information. For instance, Nokia 6150 shows the title in the top center of the screen. |
<p> </p> |
All text within these tags are organized in paragraph. It is required for all cards to have at least one paragraph. |
<!-- | All text after this are comments. They are not interpreted by the browser. |
Since WAP phones have small memory capacities hardware engineers will go into action creating better memory systems.