HTML3
Sections
  Home
    Intro
    History
    FAQ

  Choices
  Side bar

  Styles
  Headers
  Footers
  Effects
  Chars
  Address
  Links
  Images
    Rollovers
  Tables
  Forms
  SSI
  Plugins
Resources
  Colour editing
  Image creation
  JS Tricks
  Servers
  Tokens
  Latin-1
|
|
HTML³: Introduction to WML |
-
-
|

WML

As of version 3.50 of HTML³ I've added WML support, and perhaps this requires a little explanation; some of you might not have heard or WML or WAP before, or perhaps you have but have not yet dabbled.

WML is basically like HTML (you'll recognise a lot of the tags, such as <b></b>, <i></i>, <input type="text"/>, <p align="center"></p> and so on), but cut down for use in mobile phones and other small devices. So you have a lot smaller command set to play with - although I've tried to intelligently map buttons in HTML³ to do at least something in WML, you won't have things like colours or headlines to play with; images are black and white, in a proprietary format.

Most importantly, as the browsers have to fit into a much smaller device (with a lot less memory and storage to play with), they are completely intolerant when faced with errors - the code you produce must be "properly formed", that is every tag that's opened must be closed (or in the case of tags that only exist in singles they contain their own closing slash - such as <br/>). You cannot get the nesting of tags messed up. All tags and attributes must be in lowercase. And you have to strictly adhere to standard header (and footer) information. Mess up, and most 'phones are so dumb they'll just return a generic page error, without telling you exactly why they failed.

So, given the problems, why bother? Well, there are four reasons:

  1. I do a lot of WML coding at work, so it makes sense for me to have WML tools available - that's why I wrote HTML³ in the first place, to help out at work.
  2. I write an advanced HTML column for RISCWorld, and so WML was a fairly natural progression - wireless technology, WML or no, is probably going to play a large part in shaping the future of the Internet. However, RISCWorld gave me permission to release the tools elsewhere - which is nice!
  3. Because it's a new technology, there aren't many tools on any platform; getting something out under RISC OS puts us in a good position.
  4. It's cool! Okay, that might not be a proper reason, so how about it's useful - I can get access to my video list on my 'phone, Palm V or "proper" computer, so when I walk into a shop (or visit the Blackstar website at work) I know exactly what videos and DVDs I've already got and don't accidentally buy duplicates. Of course if a friend happens to see this, it's still cool :)

Obviously I will be covering all of this in more depth in the RISCWorld article, but here's a quick rundown of some things you'll need to know. There are other pieces of information in the rest of the documentation, but here are some basics.

Basic page

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

Notice how you have the first two lines setting up the type of document; these lines basically never change, so just copy them and have done with it. Then, as with HTML, you have <wml><card> - sort of like <html><body> (there are <head> tags, but they aren't necessary in WML). Don't forget you must close these two tags at the end of the document! Then there's a paragraph tag (<p>) - there must be at least one on every page, and it must be closed at the bottom of the page. As there are no tags like <center> you'll probably find you use paragraph tags quite a lot - <p align="center"> - but don't forget that you must close each and every one of them (with </p>) before starting a new one!

There are a number of simple tags that you'll already be familiar with, and might be all you need for simple WML pages. These are:

<b></b>           (bold)
<i></i>           (italic)
<u></u>           (underline)
<em></em>         (emphasized; =~ italic)
<strong></strong> (strong; =~ bold)
<big></big>       (bigger text)
<small></small>   (smaller text)
Of these, only really bold/strong, underline and big seem to work regularly on phones (they don't seem to have italic or small character sets built in), so don't get too upset if things don't look exactly as you think they should on your phone.

Another tag that will be familar is the img tag, although it has to be closed with a "/" character at the end. It must have the src and alt attributes (even if the alt is blank - alt=""). It can have a surprisingly large subset of HTML attributes assigned to it - height, width, vspace, hspace, align top|middle|bottom - but be aware that many 'phones will center the image on a new line, so you can't have text around the image. Also you'll have to get a converter to use the proprietary graphics format (more of which later). However, as most sites, even professional ones, don't yet use images, having a WML homepage with images on will make you look cool!

<img src="image.wbmp" alt="An image"/>

To accompany the article I've made sure there are enough resources available to get WML authoring under RISC OS underway, of which HTML³ is but one.

  • HTML³ for tag output
  • StrongEd mode - all tags are programmed in so it will highlight unknown or badly formed tags. There are also a number of helpful buttons and menu options (such as make selection bold, input standard header and so on).
  • !WBMP converts Sprites to WBMP, and WBMPs to Sprite.
  • Proper RISC OS file allocations: &F8E is a WML file, &F8F a WBMP image.
  • RISC OS 4-style Filer icons in all three standard colour depths.
  • MimeMap and DosMap file updates
You should find the WBMP converter in the "Plugins" directory of this program; this also contains the filer icons of course. All the resources should be available from http://www.iconbar.com/ as soon as the article is published. I should also be able to help out if your ISP's web server is not WML enabled.

HTML³: © Richard Goodwin 1997-2002

|