Free Webmaster Help Logo
Tutorials Articles Tools Images Directory Ask Newsletter

Advanced HTML
Frames & Tables
Rounded Table Corners
Flash 5
Site Promotion
Mobile Internet: WML/WAP
Server Side Includes (SSI)
HTML - The Basics


Related Links
WAP Wikipedia
HTML Tutorial
Teraflops WBMP Converter
More Mobile Internet: WML/WAP Sites

Sitemap | Contact | Link To Us | Advertise
Report A Problem

Mobile Internet: WML/WAP Tutorial
Part 3 - Adding Text


In the last part I showed you how to create the basic file which will contain your WAP site. In this part I am going to show you how to insert text and how to format it.

The <p> Tag

Just like in HTML the <p> tag is used to show where a paragraph begins and ends. Unlike HTML, though, all text on a WML page must be inside these tags. You are not allowed to nest these tags either. One important thing to remember about WML is that, unlike HTML where a page will still display even if there is bad code, a WAP phone will just reject a page if there is and code it doesn't understand.

As with HTML you use the tags as follows:


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:

<p align="center">

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


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" "">
<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!

What Next?

In Part 4 I will show you how to add hyperlinks and images to your site.

© 1999 - 2019