Web | This Site

WML Home
WML Tags Reference
Selected Reading
© 2011 TutorialsPoint.COM

| Home |  | References |  | Discussion Forums |  | About TP

# WML <pre> Tag

The <pre> element is used to specify preformatted text in WML. Preformatted text is text of which the format follows the way it is typed in the WML document.

This tag preserves all the white spaces enclosed inside this tag. Make sure you are not putting this tag inside <p>...</p>

# Attributes:

The <pre> element supports following attributes:

Attribute | Value | Description
--- | --- | ---
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.

# Example:

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

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

    <wml>

    <card title="Preformatted Text">
    <pre>
       This is     preformatted
            text and will appear
     as it it.
    </pre>
    </card>

    </wml>

This will produce following result:

Advertisement

Online Image Processing

Indian Baby Names