Mobile Internet: WML/WAP Tutorial
Part 2 - Beginning A WAP Site
After reading the introduction you should understand about WAP sites, WML and what you can do with them so I will go straight into how to create a site. Note that you should really either have a WAP phone or a WAP simulator so that you can view your site and a knowledge of HTML is useful.
Finding A WML Host
Unfortunately WML cannot be run on all web hosts. For WML content to be run, a web host must make some changes to the configuration of their web server. If your host cannot do this for you, you can try WAPHosts.net. They can provide you with a server which will support WML.
Declaring A WML Document
When you are creating a WML document all you need is notepad or another text editor, just like for HTML. The first thing you should enter is:
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"><wml>
this tells the phone that it is interpreting a WML document and which WML standards it is using.
Instead of having pages, WAP sites have cards. These are what is displayed on the screen at one time, just like a page. More than one card can be inserted in each WML document. To declare a card, insert the following:
<card id="index" title="My WAP Site" newcontext="true">
This will make a card with the ID index (used for linking) and will display the text:
My WAP Site
at the top of the screen.
Unlike with HTML, it is extremely important to close WML tags. If you do not, a page will certainly not work. You must close both the <card> and <wml> tags:
In the next part I will show you how to add text to your site.
1999 - 2019 FreeWebmasterHelp.com