New editorial edition, December 2026. This historical address is retained for existing links; the text below is newly written.
The WML Deck and Card Structure
The <wml> element encloses the cards in the deck. For a card targeted by a fragment link, identify the matching id. Do not assume that id or title is mandatory on every card merely because both appear in this example.
Navigation within a deck typically utilizes the anchor element. In WML, an href attribute can refer to a specific card within the same deck by using the '#' symbol followed by the target card's ID. This allows a user to transition from one screen to another without requesting a new file from a server.
Analyzing Card Transitions
When inspecting a WML file, transitions are defined by the relationship between the source card's link and the destination card's ID. In a reciprocal link setup, Card A contains a link to Card B, and Card B contains a link back to Card A. This creates a closed loop of navigation that was standard for early mobile interfaces.
It is important to note that while an HTML derivative can mimic this behavior through hyperlinks, a modern web browser does not execute WML semantics such as deck-level state or specific WML event handling. An HTML reading copy is a derivative representation, not a fully equivalent WML runtime.
Deconstructing a Two-Card Deck
The following code block represents a standard two-card deck. This example is used to demonstrate how card IDs and fragment-based links function in a legacy environment.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id="start" title="Archive example">
<p>Choose a card: <a href="#details">Open details</a></p>
</card>
<card id="details" title="Details">
<p>This text belongs to the second card. <a href="#start">Back to start</a></p>
</card>
</wml>- Check that the wml element encloses the cards.
- For each fragment link, find the matching card id.
- Check that IDs used as targets are unique.
- Treat the title as a screen label where present, not proof of a mandatory attribute.
A WML deck functions as a single file containing multiple navigable screens, where transitions are managed by linking to specific card IDs via fragments.