WML Tutorial
WML References
WML Tools
WML Useful Resources
Selected Reading
- WML2 - Tutorial
- WML - DTD
- WML - Template
- WML - Timer
- WML - Events
- WML - Server Scripts
- WML - Submit Data
- WML - Inputs
- WML - Tasks
- WML - Links
- WML - Tables
- WML - Images
- WML - Fonts
- WML - Formatting
- WML - Variables
- WML - Comments
- WML - Elements
- WML - Syntax
- WML - Environment
- WML - Overview
- WML - Home
WML References
WML Tools
WML Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
WML - Tables
WML - Tables
The <table> element along with <tr> and <td> is used to create a table in WML. WML does not allow the nesting of tables
A <table> element should be put with-in <p>...</p> elements.
The <table /> element supports the following attributes:
Attribute | Value | Description |
---|---|---|
columns | number | Sets the number of columns in the table |
apgn |
L C R | To specify the horizontal text apgnment of the columns, you need to assign three letters to the apgn attribute. Each letter represents the horizontal text apgnment of a column. The letter can be L, C, or R. For example, if you want the following settings to be appped to your table:
First table column -- Left-apgned Second table column -- Center-apgned Third table column -- Right-apgned Then you should set the value of the apgn attribute to LCR. |
xml:lang | language_code | Sets the language used in the element |
class | class data | Sets a class name for the element. |
id | element ID | A unique ID for the element. |
Following is the example showing usage of <table> element.
<?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd"> <wml> <card title="WML Tables"> <p> <table columns="3" apgn="LCR"> <tr> <td>Col 1</td> <td>Col 2</td> <td>Col 3</td> </tr> <tr> <td>A</td> <td>B</td> <td>C</td> </tr> <tr> <td>D</td> <td>E</td> <td>F</td> </tr> </table> </p> </card> </wml>
This will produce the following result: