15. XHTML
MP Lists
The
<ul>, <ol> and <li> elements are used to create
lists in XHTML MP.
To
create an unordered list, use the <ul> element. Each list item
in an unordered list begins with a bullet. The <li></li>
tags are used to enclose every list item. This XHTML MP example
demonstrates how to create an unordered list:
(listsEg1.xhtml)
<?xml
version="1.0"?> <!DOCTYPE html PUBLIC
"-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XHTML
MP Tutorial</title> </head>
<body> <p>Table
of Contents:</p> <ul> <li>Part 1
XHTML MP Introduction</li> <li>Part 2
Development of Wireless Markup Languages</li> <li>Part
3 Advantages of XHTML MP</li> <li>Part 4 WML
Features Lost in XHTML MP</li> </ul> </body> </html>

 Sony
Ericsson T610
|

 Nokia
Mobile Browser 4.0
|
To
create an ordered list, use the <ol> element. An ordered list
has list numbering. List items are enclosed within <li></li>
tags. The following XHTML MP example demonstrates how to create an
ordered list.
(listsEg2.xhtml)
<?xml
version="1.0"?> <!DOCTYPE html PUBLIC
"-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XHTML
MP Tutorial</title> </head>
<body> <p>Table
of Contents:</p> <ol> <li>XHTML MP
Introduction</li> <li>Development of Wireless
Markup Languages</li> <li>Advantages of XHTML
MP</li> <li>WML Features Lost in XHTML
MP</li> </ol> </body> </html>

 Sony
Ericsson T610
|

 Nokia
Mobile Browser 4.0
|
You
can make use of the start attribute of the <ol> element
to specify the starting number of the sequence, like this:
(listsEg3.xhtml)
<?xml
version="1.0"?> <!DOCTYPE html PUBLIC
"-//WAPFORUM//DTD XHTML Mobile 1.0//EN"
"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"> <head> <title>XHTML
MP Tutorial</title> </head>
<body> <p>Table
of Contents:</p> <ol start="4"> <li>XHTML
MP Introduction</li> <li>Development of Wireless
Markup Languages</li> <li>Advantages of XHTML
MP</li> <li>WML Features Lost in XHTML
MP</li> </ol> </body> </html>
The
result of the above XHTML MP example in some WAP browsers is shown
below:

 Sony
Ericsson T610
|

 Nokia
Mobile Browser 4.0
|
With
WAP CSS, you can have more precise control over the outlook of a
list. For example, you can control the bullet shape of unordered
lists and the list numbering of ordered lists (for example, changing
the list numbering from "1, 2, 3..." to "i, ii,
iii...").
Some
of the commonly used list properties of WAP CSS are discussed in the
"WCSS List Properties"
section of our WAP CSS tutorial.
Feedback Form ( ExpandCollapse)
|