News:

This week IPhone 15 Pro winner is karn
You can be too a winner! Become the top poster of the week and win valuable prizes.  More details are You are not allowed to view links. Register or Login 

Main Menu

WML Formatting

Started by ben2ong2, October 05, 2006, 06:50:04 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ben2ong2

Decks and Cards
WML pages are often called "decks". A deck contains a set of cards. A card element can contain text, markup, links, input-fields, tasks, images and more. Cards can be related to each other with links.
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:

<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN""You are not allowed to view links. Register or Login"><wml><card id="no1" title="Card 1"> <p>Hello World!</p></card><card id="no2" title="Card 2"> <p>Welcome to our WAP Tutorial!</p></card></wml>
The result MIGHT look like this in your mobile phone display (note that only one card is displayed at a time):

------ Card 1 ------
    Hello World!
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login

ben2ong2

Text Formatting
A WML card can be set up to display the text formatting functions of WML:
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN""You are not allowed to view links. Register or Login"><wml><card title="Formatting"> <p>normal
emphasized
strong
bold
italic
underline
<big>big</big>
<small>small</small></p></card></wml>
The result MIGHT look like this in your mobile phone display (don't take it for granted that all formatting tags will render as expected):
----- Formatting -----
normal
emphasized
strong
bold
italic
underline
big
small
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login

ben2ong2

Tables
A WML card can be set up to display the table functions of WML:
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN""You are not allowed to view links. Register or Login"><wml><card title="Table"><p><table columns="3"><tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr></table></p></card></wml>
The result MIGHT look like this in your mobile phone display:
------ Table ------
Cell 1   
Cell 2   
Cell 3
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login