Page 60 - DCAP512_WAP_AND_WML
P. 60
WAP & WML
Notes one more screens. Cellular device displays first card when it receives a Deck. And in first card
using elements and attributes we can define our navigational structure between different cards.
Let’s create our first application. So, here is the code of our application.
<?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=”Learning WML “>
<p>
Welcome to Unwired World!
</p>
</card>
</wml>
In any WML application first three line is must and it contains the XML and document type
declaration.
<?xml version=”1.0"?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN”
“http://www.wapforum.org/DTD/wml_1.1.xml”>
Task According to you what is the procedure of making the first card in WML?
After XML and document type declaration WML deck start with <wml> and ends with </wml>
tags. Each deck may contain one or more cards. First card of WML page is displayed by the
cellular device and this card provides the links to the other cards of the deck.
<wml>
<card id=”Card1" title=”Learning WML “>
<p>
Welcome to Unwired World!
</p>
</card>
</wml>
WML card starts with <card>and ends with </card> tag. Attribute “id” of card element gives the
identity to the card and using this id we can refer any card in the WML page. Next is <p> tag
which we are using to display the paragraph. We can use <p>, <b>, <i>, <br>, <a> in our
programming and these tags are identical to the HTML tags.
Tags Functionality
<p> Writing paragraph
<b> Writing bold text
54 LOVELY PROFESSIONAL UNIVERSITY