Webmaster

Wap/WML : Images
Contents ]
Jean-Michel Marchand

Incorporating the Image

Incorporating an image into a WML deck is not difficult. To do this, just use the <img> tag, as in HTML. However, there are some small things you need to know.

First of all, the alt attribute assigned to this tag is mandatory. You must indicate a (very) brief image description. This text will be displayed if the user has deactivated the image display function or if the image is missing at the specified location.

Next, the <img> tag does not have a closing tag. Under these circumstances, it is compulsory to terminate it with the / character.

Here is how to embed our cow, using this tag:

<card id="Card" title="Image">
<p>
<img src="cow.wbmp" alt="The cow"/>
</p>
</card>

The display on the phone screen will look like this:



Figure 4: A cow in a cell phone!




  1   2   3