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 ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.