WAP 2.0 Mobile Web: XHTML Mobile Profile: David Robison & Jules Pagna Disso University of Bradford
WAP 2.0 Mobile Web: XHTML Mobile Profile: David Robison & Jules Pagna Disso University of Bradford
0 Mobile Web:
XHTML Mobile Profile
Note: The Elements look a lot like regular HTML and behave in a very similar way
XHTML Mobile Profile
<head>
<title>My Mobile Page</title>
</head>
<body>
<div>Hello world.</div>
</body>
</html>
Note what happens when you test the output in different mobile
browsers.
The <b> and <i> tags mean bold and italic.
The <small> tag reduces the text size.
The <big> tag increases it.
The <em> and <strong> styles are similar. The WAP browser will
display text with emphasis (<em>) or strong (<strong>) style in
some way that makes it more noticeable. The effect depends on the
actual wireless device.
You can have more precise control over font formats with WAP
CSS. For example, you can control the font family to be used or set
a specific font size (e.g. 12pt) to some text.
The <u> tag of HTML does not exist in XHTML MP. So, if you want
to underline some text, WAP CSS has to be used.
Trouble-shooting
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Unnumbered Lists</title>
</head>
<body>
<div><em>Unnumbered List:</em></div>
<ul>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>
<li>And so on...</li>
</ul>
</body>
</html>
Links, Hyperlinks, Calls and Emails
Like in WML and in HTML, Hyperlinks are used
to link to another XHTML document and you can
use href to trigger a call also.
Examples:
Tables
XHTML MP provides support for use of
tables <head>
<title>An XHTML MP Table</title>
</head>
<body>
<table>
<tr>
<td>Item 1</td>
<td>Item 2</td>
</tr>
<tr>
<td>Item 3</td>
<td>Item 4</td>
</tr>
</table>
</body>
Table output
Comments
You can include comments in your XHTML-MP code.
Browsers ignore all comments.
A comment is every character between the comment
start string ( <!-- )and the comment end string ( --> ):
<!-- one or more lines of comments -->
Comments can contain reminders about how and why
you wrote the code the way you did, plans for the future,
or other helpful information for yourself or others who will
work with your code. You can also use comments to
disable sections of code temporarily.
NOTE The browser downloads comments along with
the rest of the document. Keep your comments brief.
Lengthy comments are not efficient for small devices.
User Input
The input element allows the user to enter information
Rather than listing the code here – an example version is included online
(currently at www.mobilitystudies.com/masters/xhtml-
mp/input.xhtml).
User Input
Input is a key element of mobile
development
Read more on the technicalities of using
XHTML MP for input here:
http://www.developershome.com/wap/xht
mlmp/xhtml_mp_tutorial.asp?
page=inputElements
What do we then do with the data? (Client
side scripting or server side dealings)
Integrating XHMTL Basic and WML/WMLScript?
hr { color:#006600;}