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 see this WML displayed in the Klondike browser in Figure 20-8.

Figure 20-8. Text formatting in WML.

graphics/20fig08.gif



Real World XML
Real World XML (2nd Edition)
ISBN: 0735712867
EAN: 2147483647
Year: 2005
Pages: 440
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net