Aligning Text
Aligning text in WML is nearly exactly the same as in HTML, except you can't use the center tag. All aligning must be done using the following <p> tags:
Center:
<p align="center">
Right:
<p align="right">
The <br/> Tag
In WML (as mentioned earlier) all tags must be closed. This causes problems when using old HTML tags (like <Br>) which have no closing tag. To get around this, some tags have had a / put on the end e.g.
<Br />
This, like in HTML will make a line break.
Text
In WML there is actually no font tag (as you can only display text in the phone's default font in black). To show text all you need to do is put it in between the <p> and </p> tags. Here is an example of a full WML document:
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="index" title="My WAP Site" newcontext="true">
<p align="center">
Welcome to my new WAP site. You can view this on your mobile phone anywhere in the world!<Br />
It is amazing!
</p>
</card>
</wml> |