Page 104 - DCAP512_WAP_AND_WML
P. 104
WAP & WML
Notes 2. WML is a tag-based markup language designed after the model of HTML for
……………...........
3. When a WML page is accessed from a mobile phone, all the cards in the page are downloaded
from the ……………...........
4. WML implements a stricter tag syntax than HTML and includes a ……………........... for use
with XML parsers.
5. The designers of WML (and its companion scripting language, WMLScript) created an
environment that demands ……………........... and processing power from browsers than
HTML and JavaScript.
6. The ……………........... language of the WAP protocol for wireless Internet access.
7.2 Layout
7.2.1 Text Wrapping and Alignment
To start a new line in display text, simply insert a <br/> tag where you want to start the line.
Notes Adding a carriage return or line feed has no effect: the WML compiler treats it as a
single space.
The p element establishes both the line wrap and alignment parameters for a paragraph. WML
has two line-wrapping modes for visual user agents: breaking (or wrapping) and non-breaking
(or non-wrapping). The current line wrap mode controls how lines too long to fit on the screen
are treated.
If mode=”wrap” is specified, the line is word-wrapped onto multiple lines. In this breaking
mode, line breaks should be inserted into a text flow as appropriate for presentation on an
individual device, and any space between words is a legal line breaking point.
If mode=”nowrap” is specified, the line is not automatically wrapped. In this non-breaking
mode, the user agent must provide a mechanism to view entire non-wrapped lines
(horizontal scrolling, for example, or some other user-agent-specific mechanism).
Any space between words is a legal line break point. The non-breaking space entity (
or ) indicates that the user agent must not treat the space as a space between words. It
is recommended that you use to prevent unwanted line breaks. The soft-hyphen
character entity ( & shy; or ) indicates a location that may be used by the user agent for
a line break. If a line break occurs at a soft-hyphen, the user agent inserts a hyphen character
( - ) at the end of the line. In all other operations, the soft-hyphen entity is ignored. Note
also that a user agent may ignore soft-hyphens when formatting text lines. The p tag establishes
both the new wrap and alignment parameters for a paragraph. If the wrap mode is not specified,
it is identical to the line–wrap mode of the previous paragraph in the current card. If the text
alignment is not specified, it defaults to left. Empty paragraphs, such as an empty element or
an element with only insignificant white space, should be considered as insignificant and
ignored by visual user agents. Insignificant paragraphs do not impact line-wrap mode. If the
p element in a card does not specify a line-wrap or alignment mode, that mode defaults to the
initial mode for the card.
98 LOVELY PROFESSIONAL UNIVERSITY