WML » Tags » td

Syntax:
<td> ... </td>

The td tag is used to create a container element to hold a single data cell within a row of a table. The data cell contains data or information that can be composed of letters, images, links, numbers, strings, and text. The data cell can also contain nested tags.

A table element can have one or more number of rows and columns. Consequently, you may place one or more data cells (td elements) in a row (tr element). The data cells in the rows line up vertically to create columns of data. Remember, you must declare the number of columns in your table using the column attribute of the table tag.
 
The td elements must be nested inside a tr element. The tr elements must be nested inside a table element.
 
Empty td elements (data cells) are permitted and are not ignored by the browser.
 
Nested Tags:  a  anchor  b  big  br  em  i  img  small  strong  u

Examples

Code:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.WAPforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="card 1">
<p>
Text preceding the table.
</p>
<p>
<table title="Table Example" columns="3" align="C">
<tr>
<td>Row 1 Col 1</td>
<td>Row 1 Col 2</td>
<td>Row 1 Col 3</td>
</tr>
<tr>
<td>Row 2 Col 1</td>
<td>Row 2 Col 2</td>
<td>Row 2 Col 3</td>
</tr>
</table>
</p>
<p>
Text following the table.
</p>
</card>
</wml>
Output:
This code shows how to use the td tag to create a table of information.
Language(s): WML

See Also: