iEntry 10th Anniversary RSS Newsletter Advertising
Join the WebProWorld Forum!
Text: Decrease Font Size Increase Font Size | Print Print Article | Share: Delicious Digg StumbleUpon Post to Twitter Post to Facebook
CommentFriday, July 27, 2001

Wireless Markup Language 101

If you missed the previous article that led to this one, you can find it here: http://www.devwebpro.com/2001/0720.html

Below are some of the mechanics of the language:

The Prologue, is the first part of your WML article. It contains information for the browser to let them know what kind of document it is and where they can find the rules (DTD) for this document. It usually is:
http://www.wapforum.org/DTD/wml_1.1.xml

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">

Line Space and Formatting Tags

<wml>
<card title="Horses">
<p>
Welcome!<br/>To the <u>wonderful</u> world of <i><b>Horses</b></i>!
</p></card>
</wml>

Here is an example of making a table in WML (This too is the same as HTML):

<wml>
<card title="TableofHorses"><p>
<table columns="3">
<tr>
<td>Thoroughbred Horses</td>
<td>Quarter Horses</td>
<td>Arabians</td>
</tr>
</table>
</p></card>
</wml>

<anchor>
When you use the anchor tag, you should use "go", "prev", or "refresh" tags to let the browser know what specific action to take.

<wml>
<card title="HorseLinks"><p>
<anchor>Thoroughbreds
<go href="thoroughbreds.wml"/>
</anchor>

<anchor>Arabians
<go href="arabians.wml"/>
</anchor>

<anchor>Paints
<go href="paints.wml"/>
</anchor>

</p></card>
</wml>

<a>
The <a> tag always performs a "go" task, with no variables. The example below does the same as the <anchor> tag example:

<wml>
<card title="Secretariat1"><p>
<a href="secretariat2.wml">More Information</a>
</p></card>
</wml>

Image
>A WML card can be set up to display an image:

<wml>
<card title="Picofsecretariat"> <p>
Here is a picture of Secretariat
<img src="../images/Secretariat.wbmp" alt="Secretariat" />
in a paragraph
</p></card>
</wml>

Input Fields
Letting a user enter information

<wml>
<card title="Input">

<p>
Name: <input name="Name" size="15"/><br/>
Age: <input name="Age" size="15" format="*N"/><br/>
Sex: <input name="Sex" size="15"/>
</p>

</card>
</wml>

Select and Option Tags for Forms

<wml>
<card title="Fastest Miler">

<p>
<select>
<option value="secretariat">Secretariat</option>
<option value="drfager">Dr. Fager</option>
<option value="spectacularbid">Spectacular Bid</option>
</select>
</p>

</card>
</wml>

Selecting More Than One Item

<wml>
<card title="Choose Your Favorite Breeds">

<p>
<select multiple="true">
<option value="arabians">Arabians</option>
<option value="quarters">Quarter Horses</option>
<option value="saddlebred">Saddlebreds</option>
</select>
</p>

</card>
</wml>

Fieldset

<wml>
<card title="HorseFieldsets">

<p>
<fieldset title="horse info">
Title: <input name="breed" type="text"/><br/>
Prize: <input name="name" type="text"/>
</fieldset>
</p>
</card>
</wml>

Go Tags allow you to change to the next page

<wml>
<card>
<p>
<anchor>
Next Page
<go href="nextpage.wml"/>
</anchor>
</p>
</card>
</wml>

Prev Task

Going back To The previous card

<wml>
<card>
<p>
<anchor>
Previous Page
<prev/>
</anchor>
</p>
</card>
</wml>

iEntry provides free highly informative newsletters for web developers, IT professionals and small business owners. We deliver 50 million email newsletters per month and have over 4,000,000 unique opt-in subscribers. From our extensive range of email newsletters we can provide you with a selection of newsletters that best meet your interests.

About the author:
iEntry provides free highly informative newsletters for web developers, IT professionals and small business owners. We deliver 50 million email newsletters per month and have over 4,000,000 unique opt-in subscribers. From our extensive range of email newsletters we can provide you with a selection of newsletters that best meet your interests.

Publish A Comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
8 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
SEARCH
Popular WPN Business Resources












Subscribe to WebProNews


Send me relevant info