O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Character Formatting

The support for character formatting in WML is quite limited compared to HTML. There is no support for specifying the color or typeface of the text, size changes are limited to “bigger” or “smaller,” and there’s no guarantee that any of these choices will be honored anyway.

Support is provided through seven elements. None take any attributes, and their effect applies to all the text they enclose. The browser is free to ignore any or all these attributes if it chooses or if its screen display can’t cope with them.

Emphasis

These two elements provide some kind of emphasis. The exact form this takes isn’t specified: some browsers may use style changes such as boldface or italics to emphasize the text, some may change the color, and some may ignore it altogether. These tags are the most likely of the character formats to be supported, and so you should use these in preference to the other formats. If you don’t need a specific style but just want some text to stand out, you should use the following two tags instead of <b>, <i>, and <u>:

<em>

Emphasis

<strong>

Strong emphasis

Size Changes

These two elements provide simple size changes in the text:

<big>

Larger font size

<small>

Smaller font size

Style Changes

These three elements provide simple text-style changes. Because many browsers don’t support these elements, you should use these only if you really need exact control over how the text is displayed:

<b>

Boldface

<i>

Italics

<u>

Underlining

Tip

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required