Start-tags and empty-element tags (but not end-tags) may also have
(In Example 1.2, the
title on the
<card> tag and the
<img> tag are both attributes.)
Attributes affect the behavior of the whole element, which is why
they can’t appear on end-tags (the only purpose of the end-tag
is to mark the end of the element). The effects of attributes vary
between different elements: the
title attribute on
<card> element sets an optional title to
be displayed with the card, while the
attribute on the
<img> element gives the URL
at which the image can be found. You can also add an
align="center" attribute to the
<p> element, which centers that paragraph of
text (if the browser supports the feature).
A further slight difference between WML and HTML is in the quoting of
attribute values. In HTML, attribute values may
appear in single quotes (
attr='value'), in double
attr="value"), and most web browsers also
allow them to be unquoted altogether (
although this isn’t strictly valid. WML doesn’t allow
unquoted attribute values: all values must appear within either
single or double quotes.
The value can be any string.
The value should be a valid URL. Unless noted otherwise in the description of the attribute, relative URLs (where only part of the URL is given) are OK; these are resolved relative to the current document’s URL. Resolving is the process of taking an incomplete (relative) URL and turning it into a complete (absolute) URL. It is described in detail in Appendix A.
The value should be a nonnegative integer.
The value represents a length on the browser’s display. It can be specified either as a whole number of pixels or as a percentage (which represents a percentage of the width or height of the screen). In either case, the value must not be negative (but may be zero).
The value should be one of the strings
false. Case is important!
The value should be a string containing only letters, digits, dots, colons, hyphens, and underscores. It is better, however, to avoid the dots, colons, and hyphens, and use only letters, digits, and underscores.
The value may contain embedded variable references (see Chapter 2, for more information on variables).
The attribute may be omitted.
The attribute must be present for the element to be processed correctly. Many browsers will refuse to process a deck if required attributes are missing.
The default value for the attribute. This value is used if the attribute isn’t specified on the tag. Only optional attributes can have defaults.
 The rules for quoting attribute values are another thing that will be familiar to XML users, since WML takes them from XML. If you don’t know XML, just remember you must use either single or double quotes around all attribute values.