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:

        AttributeValueDescription
        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 <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 the following result:

        WAP Example 7
        Advertisements