WML <p> Tag

Advertisements


The <p> element defines a paragraph of text and WAP browsers always render a paragraph in a new line.

A <p> element is required to define any text, image or a table in WML.

Attributes:

The <p> element supports the following attributes:

AttributeValueDescription
align
  • left

  • right

  • center

This is used to change the horizontal alignment of a paragraph.
mode
  • wrap

  • nowrap

Sets whether a paragraph should wrap lines or not.
xml:langlanguage_codeSets the language used in the element
classclass dataSets a class name for the element.
idelement IDA unique ID for the element.

Example:

Following is the example showing usage of <p> element.

<?xml version="1.0"?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
"http://www.wapforum.org/DTD/wml12.dtd">

<wml>

<card title="Paragraph Example">
<p align="center">
This is first  paragraph
</p>
<p align="right">
This is second  paragraph
</p>
</card>

</wml>

This will produce the following result:

WAP Example 3


Advertisements
Advertisements