is the root element of XHTML MP. All other elements should be
enclosed within the <html></html> tags.
xmlns attribute is used to define the namespace for XHTML MP.
Currently only the value "http://www.w3.org/1999/xhtml" can
be assigned to the xmlns attribute. You must include the xmlns
attribute in order to conform strictly to the XHTML MP standard,
although currently most WAP browsers will still display the XHTML MP
page correctly even if the xmlns attribute is missing.
<head> and </head> tags are used to specify the start and
the end of the document head respectively. Information about the
document is placed in the document head. The <head> element is
used as a container for other elements such as <title> and
<link>. The <title> element and the <link> element
are used to specify the title of the XHTML MP document and the URL to
the external cascading style sheet respectively. Metadata of the
XHTML MP document is also placed in the document head. Metadata is
specified using the <meta> element.
<title> element is used to specify the title of an XHTML MP
page. This element should be enclosed within the <head></head>
tag pair. Most WAP browsers will display the title at the top of the
screen. If the title is too long, WAP browsers will truncate the
title to match the size of the title bar. WAP CSS styles cannot be
used with the <title> element.
<body> element is used as a container for the actual content.
An XHTML MP file can only contain one <body> element, which
means the deck and card concept of WML 1.x is not supported any more.
cannot be enclosed directly in the <body></body> tag
pair. For example, the following markup code is incorrect in XHTML
world. Welcome to our XHTML MP tutorial.
correct the above XHTML MP markup code, the text in the document body
must be enclosed in some other elements such as paragraphs (<p></p>),
lists (<ul><li></li></ul> or
<ol><li></li></ol>), headings (<h1></h1>,
<h2></h2>...), etc. The following markup code is correct
in XHTML MP:
world. Welcome to our XHTML MP tutorial.</p>
<p> element is used to enclose a paragraph of text. Besides text,
things such as anchor links and images can be included in the <p> element. WAP
browsers always render a paragraph on a new line.
HTML and WML 1.x, you can make use of the align attribute of
the <p> element to change the horizontal alignment of a
paragraph. Note that the align attribute has been removed in
XHTML MP. To change the horizontal alignment of a paragraph of text
in XHTML MP, you have to use the WAP CSS text-align property.
For example, if you put the following WAP CSS style statement in your
XHTML MP page's external style sheet, text in all paragraphs will be
aligned to the right.
Feedback Form (ExpandCollapse)