Library tutorials & articles
Wireless Markup Language (WML) Tutorial
Getting Started
WML Cards
The content of the page is placed between wml tags within the document. WAP sites consist of cards rather than pages. Each card represents the text that will be displayed on the device's screen. Not surprisingly, a collection of cards is referred to as a deck. A single document may contain one or more cards. Each card should contain an id attribute, and a title attribute. The id attribute is used for linking, and the title attribute will be displayed as the title on the device's screen. The following example defines a basic WML document with a single card.
first.wml
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Welcome">
<p>
This is my first WML document.
</p>
</card>
</wml>
Formatting Text
The following elements are supported in WML to format how the text will be displayed on the device.
| Element | Description |
|---|---|
<b> some text </b>
|
The text between these tags will be rendered in bold |
<big> some text </big>
|
The text between these tags will be rendered with a large font |
<br/>
|
This tag will force a new line. As the tag doesn't have a corresponding closing tag, a forward slash is required at the end |
<em> some text </em>
|
The text between these tags will be rendered with emphasised |
<i> some text </i>
|
The text between these tags will be rendered in italic |
<p> some text </p>
|
All text between these tags are treated as a paragraph |
<small> some text </small>
|
The text between these tags will be rendered with a small font |
<strong> some text </strong>
|
The text between these tags will be rendered with a strong emphasis |
<u> some text </u>
|
The text between these tags will be rendered underlined |
The following example extends the original document to include some extra formatting.
formatted.wml
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="Welcome">
<p align="center">
This is my <br/><em>first</em><br/> WML document.
</p>
</card>
</wml>
Output From Program
Displaying Special Characters in WML
The following characters all have reserved meanings in WML. To show the characters on the device, you must use the code.
| Character | Description | Code |
|---|---|---|
<
|
Less than | < |
>
|
Greater than | > |
'
|
Apostrophe | ' |
"
|
Quote | " |
$
|
Dollar sign | $$ |
|
Non-breaking space | |
Related articles
Related discussion
-
Binary Studio | software development outsourcing Ukraine
by shane124 (4 replies)
-
ideas in building a captive portal
by sjranjan (2 replies)
-
A particular gallery image
by margy80 (0 replies)
-
(Very urgent)how to assign the value of the variable in javascript function into php variable
by mazhar_qayyum (3 replies)
-
Iterating through DB rows by column name
by fil.moore (0 replies)
Related podcasts
-
EarthClassMail.com - Moving from LAMP to .NET 3.5
Scott chats with Matt Davis, architect at EarthClassMail.com, about their move from a LAMP stack (Linux/Apache/mysql/PHP) to .NET 3.5. What's working, what's not, and what kinds of issues are they running into as their architect their solution.
Events coming up
-
Dec
3
The Auckland PHP December meetup
Auckland, New Zealand
Topic: Magento E-Commerce platform Speaker: Robert Popovic, LERO9, Robert is the Technical Director and co-founder of LERO9. Robert attended the Electrotechnical Faculty at The University of Belgrade where he graduated with a Masters in Computer Science and Information Technology. Robert has worked exclusively in the field of web and software development throughout his career.
hi
I am Jagannath working as Sr.Programmer in Med Write India Ltd. I have one doubt that how to search the latest modified file on the stipulated time and date.If you will help me then i will be happy
Bye
Jagannath
my alternate email address is b_jagan03@yahoo.co.in
Phno : 09849654314
Nice articlae but require more info on this
This thread is for discussions of Wireless Markup Language (WML) Tutorial.