WML Learning (iii): displaying text

Source: Internet
Author: User
Show display text
The WML base and HTML are the same on the display of the text. The text paragraphs are contained between the <p align= "alignment" mode= "WrapMode" > and </p>, and the Align property specifies the alignment of the paragraph text, the default is left, and the other option right and center The Mode property specifies whether the line wraps automatically when all text is not displayed on a line, the default is word wrapping wrap, and if you select NoWrap, the browser displays all the text by a mechanism similar to the horizontal scroll bar.

Line-Wrapping label is the same as &LT;BR/&GT, here first for, in the standard if there are more than <input> or &LT;SELECT&GT, in the meantime do not use &LT;BR/&GT, otherwise it will make the mobile browser as a breakpoint and the form page display.

The modifiers for the text are <b>, <i>, <u>, <em>, <strong>, <big>, and <small&gt, meaning the same as in HTML.

The table display label is similar to HTML, using <table title= "name" align= "Left|right|center" columns= "Columns" >, <tr> and <td> to display,< The Table> Title property is used to name the table, columns the column number of the table, and cannot be 0, and the optional align property is the same as the previous reference. The table can contain text and pictures.

Test1.wml
--------------
<?xml version= "1.0"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "Http://www.wapforum.org/DTD/wml_1.1.xml" >

<wml>
<card>
<p align= "center" >
<i>Hello</i><br/>
<b><i>World!</i></b>
<table title= "MyTable" align= "right" columns= "2" >
<tr>
<td>1-1</td>
<td>1-2</td>
</tr>
<tr>
<td>2-1</td>
<td>2-2</td>
</tr>
</table>
</p>
</card>
</wml>

Show Pictures

The label that displays the picture (1-bit black and white BMP picture) is similar to html, should be placed in <p> and not in the features such as <do> and <option> and menu labels.
The *alt property is used to specify the text to display when the phone does not support the display of pictures.
The *src property specifies the URL of the picture, but when the following LOCALSRC attribute is available, the SRC attribute is ignored by the mobile browser.
The *localsrc property is used to specify that icons appear in the cell phone ROM, and if they are not found, go to Up.link server.
* The optional Align property is used to indicate the alignment of the picture with the current text, the default value is bottom, and the to and middle are selected.
The *height, width, vspace, and Hspace properties specify the spacing between the length and spacing of the pictures, and not all WAP phones currently support these properties.

Test2.wml
---------------
<?xml version= "1.0"?>
<! DOCTYPE WML public "-//wapforum//dtd WML 1.1//en" "Http://www.wapforum.org/DTD/wml_1.1.xml" >

<wml>
<card>
<p align= "center" ></p>
</card>
</wml>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.