12.2. Setting the Font
Size (font-size Property)
The
font-size WCSS property is
used to set the font size of some text. It takes a length value that
we discussed in the "Common
Types of Property Value: Length"
section of this WCSS tutorial. Here is an example that illustrates
its use:
p
{font-size: 12pt}
The
above WAP CSS style statement specifies that the font size of the
text enclosed in <p></p> tags should be 12 points.
The
font-size WCSS property also
accepts the following keywords: xx-small,
x-small, small,
medium, large,
x-large and xx-large. The default value of the
font-size WCSS property is
medium. The keywords
smaller and larger
are also valid property values.
12.3. Setting the Font
Style: Italic, Bold and Underline (font-style, font-weight and
text-decoration Properties)
Two
font styles, italic and bold, are used frequently in many mobile
Internet applications. To specify the italic font style to some text,
you need to use the font-style
WCSS property. For example:
p
{font-style: italic}
The
above WAP CSS style statement specifies that the text enclosed in
<p></p> tags should be displayed in italics. The same
effect can be achieved with the XHTML MP tag <i>.
To
specify the bold font style to some text, you need to use the
font-weight WCSS property.
For example:
h1
{font-weight: bold}
The
above WAP CSS style statement specifies that all level-1 headings
should be displayed in bold type. The same effect can be achieved
with the XHTML MP tag <b>.
Note
that there is no <u> tag in XHTML MP. To underline some text,
the text-decoration WCSS
property must be used, like this:
h1
{text-decoration: underline}
The
above WAP style statement specifies that all level-1 headings should
be underlined.
Feedback Form (ExpandCollapse)
|
|