A Deck of Cards
WML uses a deck and card model for content display and navigation. Wireless users receive a WML deck consisting of one or more cards. Each deck is a self-contained unit, allowing a user to work offline between deck requests. A card is intended to represent a single physical display screen. To define a deck, a pair of a <wml>:</wml> tag set is used that contains one or more cards delimited by <card></card>.
Figure 1 shows a simple deck with one card that displays only a single line of text. The paragraph tag, <p>, defines the basic unit of organization within a card.
A Simple WML deck
Note the first two lines that precede the <wml> tag. These lines are found in all WML decks and must be the first text in the deck. The first line is required because WML is an XML language. The second line references the WML document type definition (DTD) that is available at the WAP Forum Web site. This DTD defines all the allowable elements and attributes in WML. In subsequent examples, we'll omit these initial lines for brevity, but keep in mind that they are required in order for your WML to be valid.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1_1.dtd"> <wml> <card> <p>Health Inspection</p> </card> </wml>