Text Elements - WordPress.com

colonteeΛογισμικό & κατασκευή λογ/κού

4 Νοε 2013 (πριν από 3 χρόνια και 9 μήνες)

114 εμφανίσεις

Wireless Application Protocol (Lab Manual)


Introduction to WML

The topmost layer in the WAP (Wireless Application Protocol) architecture is made up of WAE (Wireless
Application Environment), which consists of WML and WML
scripting language.

WML stands for




WML is an application of XML, which is defined in a document
type definition.

WML is based on HDML and is modified so that it can be compared with HTML.

WML takes care of the small screen and the
low bandwidth of transmission.

WML is the markup language defined in the WAP specification.

WAP sites are written in WML, while web sites are written in HTML.

WML is very similar to HTML. Both of them use tags and are written in plain text format.

WML file
s have the extension ".wml".

WML supports client
side scripting. The scripting language supported is called WMLScript.

WML Decks and Cards:

A main difference between HTML and WML is that the basic unit of navigation in HTML is a page, while
that in WML is

a card. A WML file can contain multiple cards and they form a deck.

When a WML page is accessed from a mobile phone, all the cards in the page are downloaded from the
WAP server. So if the user goes to another card of the same deck, the mobile browser doe
s not have to send
any requests to the server since the file that contains the deck is already stored in the wireless device.

You can put links, text, images, input fields, option boxes and many other elements in a card.

WML Program Structure:

A WML progra
m is typically divided into two parts: the document prolog and the body. Consider the
following code it
is the basic structure of a WML program:

<?xml version="1.0"?>




<card id="one" title="First Card">


This is the first card in the deck



<card id="two" title="Second Card">


Ths is the second card in the deck



Wireless Application Protocol (Lab Manual)


WML is defined by a set of


that specify all
markup and structural information for a WML deck. Elements
are identified by tags, which are each enclosed in a pair of angle brackets.

Unlike HTML, WML strictly adheres to the XML hierarchical structure, and thus, elements must contain a start tag;
any co
ntent such as text and/or other elements; and an end tag. Elements have one of the following two structures:

<tag> content </tag>

: This form is identical to HTML.

<tag />:

This is used when an element cannot contain visible content or is empty, such as a
line break.
WML document's prolog part does not have any element which has closing element.

Following table lists the majority of valid elements. A complete detail of all these elements is given in

WML Tags

Deck & Card Elements

WML Elements



Defines a WML comment


Defines a WML deck (WML root)


Defines head information


Defines meta information


Defines a card in a deck


Defines information about the access control of a deck


a code template for all the cards in a deck

Text Elements

WML Elements



Defines a line break


Defines a paragraph


Defines a table


Defines a table cell (table data)

Wireless Application Protocol (Lab Manual)


Defines a table row


Defines preformatted text

Text Formatting Tags

WML Elements



Defines bold text


Defines big text


Defines emphasized text


Defines italic text


Defines small text


Defines strong text


Defines underlined text

Image Elements




Defines an image

Anchor Elements

WML Elements



Defines an anchor


Defines an anchor

Event Elements

WML Elements



Defines a do event handler


Defines an onevent event handler


Defines a postfield event handler

Wireless Application Protocol (Lab Manual)


Defines an ontimer event handler


Defines an onenterforward handler


Defines an onenterbackward handler


Defines an onpick event handler

Task Elements

WML Elements



Represents the action of switching to a new card


Says that nothing should be done


Represents the action of going back to the previous card


Refreshes some specified card variables.

Input Elements

WML Elements



Defines an input field


Defines a select group


Defines an option in a selectable list


Defines a set of input fields


Defines an option group in a selectable list

Variable Elements

WML Elements



Defines and sets a variable


Defines a timer