O'Reilly logo

Real World XML by Steven Holzner

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

Basic Text Styling

WML also supports several basic text styling elements modeled after HTML, such as <b> for bold text, <i> for italic text, <u> for underlined text, and so on. Here's an example that puts these basic text styling elements to work (note that not all microbrowsers will support all these styling elements):

Listing . ch20_09.wml
 
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 2.0//EN"
    "http://www.wapforum.org/dtd/wml20.dtd" >
<wml>
    <card id="Card1" title="Text Formatting">
        <p align="center"><b>Text Formatting</b></p>
        <p>
            WML supports these text styles:
					<b>bold</b>,
					<big>big</big>,
					<em>emphasis</em>,
					<i>italic</i>,
					<small>small</small>,
					<strong>strong</strong>,
					and <u>underline</u>.
        </p>
    </card>
</wml>

You can ...

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