Wml-p-tag

提供:Dev Guides
移動先:案内検索

WML <p>タグ

<p>要素はテキストの段落を定義し、WAPブラウザーは常に新しい行で段落をレンダリングします。

WMLでテキスト、画像、またはテーブルを定義するには、<p>要素が必要です。

属性:

<p>要素は、次の属性をサポートしています。

Attribute Value Description
align
  • left
  • センター
This is used to change the horizontal alignment of a paragraph.
mode
  • wrap
  • ナラップ
Sets whether a paragraph should wrap lines or not.
xml:lang language_code Sets the language used in the element
class class data Sets a class name for the element.
id element ID A unique ID for the element.

例:

以下は、<p>要素の使用法を示す例です。

<?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>

これにより、次の結果が生成されます。

WAP例3