This is a tutorial developed by me that describes how to make a good wap site if you are new to mobile web.
Introduction
What is WAP?
WAP stands for Wireless Application Protocol. Like the name suggested, This technology is used to access and control mobile application. WAP is inherited from Internet standards. This protocol helps to access the web by the micro browsers installed on the mobile phones. That changes the web world and now the web is also sharing with millions of WAP sites. WAP uses the mark-up language WML (not HTML) to show (or paint like HTML does) the contents of a page on mobile browsers. WML is defined as an XML 1.0 application.
What is WML?
WML (Wireless Markup Language) is the new web language for making sites on mobile phones. WML is used to create pages that can be displayed in a WAP browser. WML is a content format for devices that implement the WAP specification, and preceded the use of other markup languages now used with WAP, such as XHTML and even standard HTML. Pages in WML are called DECKS. Decks are constructed as a set of CARDS.
Why Should I Use WML?
It is not necessary to use WML for making WAP sites. But WML is much similar to HTML. That helps you to study and understand the format of WML easy. So WML is a better option to make mobile site pages. WML pages have the extension *.wml, just like HTML pages have the extension *.html.
How do WAP Sites Differ from Normal Sites?
WAP sites are not like standard web sites at all. Sites written in WML are monochrome, very limited and there is very little screen space. Because of this you must be very careful when you are designing a WAP site as it is nothing like a web site. Only use small pages for wap sites. This is because mobile phones hold little memory to display pages.
Steps to Make your WAP Site:
Find A WML Supporting Host for Your Mobile Site
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. They can provide you with a server which will support WML.
Making WML Document
The first thing you should enter on your WML document is:
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml" >
<wml>
The above code determines the type of WML document and browser uses this line to identify the version of WML used by the WAP page. The <WML> tag is just like <HTML> tag.
Cards:
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 (page). The mobile server automatically link all cards on a WML page. To declare a card, insert the following:
<card id="card ID" title="Card Title">
CARD BODY ( This is just like the BODY part of HTML page. )
</card>
You can make several cards on a page. One card will display at one time on the mobile screen. You can link cards.When a WML page is accessed from a mobile phone, all the cards in the page are downloaded from the WAP server. Navigation between the cards is done by the phone computer - inside the phone - without any extra access trips to the server.
Putting Text on Cards:
You can put text on the card (wap pages) with the help of <p></p> tags. This tag works like the HTML paragraph tag. You can align the text with align attribute. Also you can use the <br/> tag for line breaks. You can use different paragraph on each card. An example to which shows the usage of p tag is given as follows:
<p align="center">Hello World!<br/>
Enjoy this wap Tutorial.
</p>
Linking Cards or WAP Pages:
You can link the WAP pages or cards just like HTML pages. With anchor tag, you can link the pages. Cards on same pages can be linked with the following format:
<a href="#Card ID">Text</a>
Another WAP pages or Card on another page can be link with the following code:
<a href="another_page.wml">Text</a>
<a href="another_page.wml#Card ID">Text</a>
A page on another domain is linked as:
<a href="http://webmasters-forums.com">Text</a>
Putting Images on WAP Page:
You can insert images same as on HTML page. The <img> tag helps to insert the image on wap page. Let me allow to give a simple example that inserts a simple image on wap page:
<img src="example.wbmp" alt="Text" />
Don't forget to put "/" at the end of single tags.
You can also use another tags using on HTML pages like table, strong, b, input, head, ect... The use of all tags are same like the use of them on HTML files.
WML Scripting:
Unlike HTML page, WML pages are little more dynamic in nature. This is because of its scripting facility. WMLScript is used to validate user input, generate dialog boxes, view error messages, access facilities of the user agent, and much more. To read more about WML Script, Click Here.
Putting WAP Files on Your Host
Upload the all WAP files you created to your hosting server with the help of a good FTP software. There are several FTP available for free. Then name the home page as index.wml. Also name the card id, that you like to display on the mobile screen when you enters into the site, as index. Now you successfully created the home page. You can link to the other pages of your WAP site with the links provided on your pages.
This is the concluding part of this tutorial. You now gone through every necessary informations needed to create a simple wap site. I hope that you can successfully make a good wap site with this tutorial.
by Iven Mathew Simon
http://webmasters-forums.com