XHTML MP Selection Lists
A selection list is a list of options that a user can select. The <select></select> tags define a selection list in XHTML MP. One or more <option></option> tag pairs are enclosed within the <select></select> tags. The <option></option> tag pair defines a list item.To send the value of the selected item to the server, the <select> […]
Submitting Form Data to the Server in XHTML MP
In the previous sections of this XHTML MP tutorial, we have mentioned about how to use selection lists and various input elements to obtain data from a user in XHTML MP. However, the user data has no use if it is not posted to the server for further processing. To post data to the server […]
Anchor Links in XHTML MP
Anchor links are used for navigation. You select an anchor link to go to another resource such as an XHTML MP page, or to scroll to a location in the current XHTML MP document. Anchor links are created with the <a></a> tag pair.The href attribute of the <a> tag is used to specify the URL […]
XHTML MP Tables
To create a table in XHTML MP, you need the <table>, <tr> and <td> tags. Data in a cell is enclosed in <td></td> tags. Cells in the same row are enclosed in <tr></tr> tags. All rows are enclosed in <table></table> tags. So, <td></td> should be enclosed in <tr></tr> and <tr></tr> should be enclosed in <table></table>. […]
XHTML MP Images
Displaying an Image in XHTML MPThe <img> tag is used to display an image in XHTML MP. This is the same as in HTML. WAP browsers will display the text assigned to the alt attribute of the <img> tag if it cannot display the image for reasons such as file not found or image format […]
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:<?xml version=”1.0″?><!DOCTYPE […]
XHTML MP Preformatted Text
In XHTML MP, leading and trailing whitespaces of a paragraph is not displayed. Furthermore, two or more whitespaces in a paragraph are shown as one whitespace on the screen of mobile devices. This behavior is demonstrated in the following XHTML MP example.<?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> Hello, welcome […]
Font Style in XHTML MP
You can use tags to change the font style of the text in XHTML MP. However, some WAP browsers only support a subset of these tags, even though these tags are defined by the XHTML MP specification. This is because the WAP browser can only make use of the fonts available on the mobile device. […]
XHTML MP Headings
The elements <h1>, <h2>, <h3>, <h4>, <h5>, and <h6> are used to specify headings (level 1 to level 6) in an XHTML MP page. WAP browsers will try to display headings of different levels with different font sizes and styles. However, some WAP devices do not have so many sizes and styles of fonts and […]
Comments in XHTML MP
Comments are placed inside <!– –> in XHTML MP. This is the same as HTML and WML 1.x. For example, the following lines are comments. WAP browsers ignore all comments.<!– This is a comment in XHTML MP –><!– This is a multi-line comment –>Line Breaking in XHTML MP<br/> is the line breaking tag in XHTML MP, […]