WML - Elements

WML is defined by a set of elements 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 content 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 Reference.

Deck & Card Elements

WML Elements Purpose
<!-->  Defines a WML comment
<wml>  Defines a WML deck (WML root)
<head> Defines head information
<meta> Defines meta information
<card> Defines a card in a deck
<access> Defines information about the access control of a deck
<template> Defines a code template for all the cards in a deck

Text Elements

WML Elements Purpose
<br> Defines a line break
<p>  Defines a paragraph
<table> Defines a table
<td> Defines a table cell (table data)
<tr> Defines a table row
<pre> Defines preformatted text

Text Formatting Tags

WML Elements Purpose
<b> Defines bold text
<big>  Defines big text
<em> Defines emphasized text
<i> Defines italic text
<small> Defines small text
<strong> Defines strong text
<u> Defines underlined text

Image Elements

WML Elements Purpose
<img> Defines an image

Anchor Elements

WML Elements Purpose
<a> Defines an anchor
<anchor>  Defines an anchor

Event Elements

WML Elements Purpose
<do> Defines a do event handler
<onevent> Defines an onevent event handler
<postfield> Defines a postfield event handler
<ontimer> Defines an ontimer event handler
<onenterforward> Defines an onenterforward handler
<onenterbackward> Defines an onenterbackward handler
<onpick> Defines an onpick event handler

Task Elements

WML Elements Purpose
<go> Represents the action of switching to a new card
<noop> Says that nothing should be done
<prev> Represents the action of going back to the previous card
<refresh> Refreshes some specified card variables.

Input Elements

WML Elements Purpose
<input>  Defines an input field
<select> Defines a select group
<option> Defines an option in a selectable list
<fieldset> Defines a set of input fields
<optgroup> Defines an option group in a selectable list

Variable Elements

WML Elements Purpose
<setvar> Defines and sets a variable
<timer> Defines a timer