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 |