Won Contests Let Us Talk Mail Me Light of Knowledge


W ML - Wireless Markup Language
  
 Building Mobile Applications using WAP & Wireless Programming


Text Formatting

Sometimes it may be required to present the text in Different Styles within the Small mobile Browser so we have different formatting Techniques . however the working of these formatting texts Depends upon the Vendor of Browsers and Makers of Mobile Phones , it may work or may not work to the desired level...

for instance Underline Tag works well in some verion of WML Browsers and not in Other Versions..

 
 Using Text Formatting
The code below shows How to use Cards Text in Different Styles
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
	<card title="Formatting"> 
	<p>
		Normal Text<br/>
		<em>emphasized Text</em><br/>
		<strong>strong Text</strong><br/>
		<b>bold Text</b><br/>
		<i>italic Text</i><br/>
		<u>underlined Text</u><br/>
		<big>big Text</big><br/>
		<small>small Text</small>
	</p>
</card>
</wml>
 Running the code
1) save the above file as format.wml in E:\wml\ Directory
2) Open UPSDK Browser, which will be a shortcut created during installation
3) Type in the URL file://e:/wml/format.wml next to GO Button Text Box, Hit Enter ..........
4) Always remember whenever u make changes to the wml script, u must click on Edit Clear Cache to View New Screen and Re-Enter URL
 Using Images
As far as i know WAP supports only wbmp [Wireless-Bit Map] Images , The code below is similar to that of placing images in a HTML Browser
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>
	<card title="Image"> 
	<p>
		<img src="/images/james.wbmp" alt="stickman" />
	</p>
	</card>
</wml>
 Running the code
1) save the above file as image.wml in E:\wml\ Directory
2) Open UPSDK Browser, which will be a shortcut created during installation
3) Type in the URL file://e:/wml/image.wml next to GO Button Text Box, Hit Enter ..........
4) Always remember whenever u make changes to the wml script, u must click on Edit Clear Cache to View New Screen and Re-Enter URL
 What Next ? Working with HTML Like Forms
 Reach me!
   My Web URL : http://www.geocities.com/james_smith73
   If you like this article and/or code mailme or Join our small Group of Java Programmers ,
Till we meet next time BYE     

  Java, J2EE, J2SE and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the United States and other countries.