Openwave Mobile Browser 6.1 and 6.2: XHTML Mobile Profile and CSS Reference
Section 27 out of 38 total sections
Current chapter: CSS Reference

You can use the font properties to set the font family, style, weight, and size of text.
IMPORTANT Although Openwave Mobile Browser supports the CSS font properties described in this section, actual support for fonts depends entirely on the individual makes and models of mobile phones. It's essential to learn the features of the phone models in your market to determine the fonts you can use for your wireless applications.

Sets a specific or generic font family for text.
Specific font family names (for example, "arial"); generic font family keywords: serif, sans-serif, cursive, fantasy, monospace; the standard keyword inherit.
See Keywords for more information.
Depends on the phone make and model.
All elements that contain text.
Enclose real font family names in quotes (for example "Times New Roman"); do not enclose generic font family keywords in quotes (for example, serif).
You can include a comma-separated series of font-family values to set backup values If one value isn't supported by a phone, the browser will try the next value, in left-to-right order.
h1 {font-family: "helvetica", "arial", sans-serif}
Displays the text of first-level heads in Helvetica, if available. If not, tries Arial, and then any available sans-serif font. If none is available, the browser uses the default font for the phone.

Sets the font "style" for text: normal (also called "roman"), italic, or oblique.
normal, italic, oblique, inherit
See Keywords for more information.
All elements that contain text.
When you specify an italic font, the browser tries to use a font with "italic" in its name or failing that, one with "oblique" in its name. Italic fonts are also sometimes named "cursive" or "kursive."
When you specify an oblique font, the browser tries to use a font with "oblique" in its name or failing that, one with "italic" in its name. Oblique fonts are also sometimes named "slanted" or "inclined." Some oblique fonts are generated by electronically slanting a roman font.
h4 {font-style: italic}
Displays the heading in italics.

Openwave Mobile Browser does not use this property.

Sets a font weight, or thickness.
normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900, inherit
The browser uses a roman font for font-weight values from 100 to 400 and a bold font for values 500 to 900 (if a bold font is available on the phone).
blockquote {font-weight: bold}
Displays the blockquote in boldface text.

Sets the size of a font, either in absolute terms or in relation surrounding content.
xx-small, x-small, small, medium, large, x-large, xx-large, larger, smaller, em, ex, cm, mm, in, pt, pc, px, %, inherit
For more information, see Units of Measure, Percentage, and Keywords.
All elements that contain text.
Relative values are relative to font size of the element that contains the current element.
p {font-size: 12pt}
Displays the paragraph in 12-point type.
h1 {font-size: 150%}
Displays all first-level heads at 150%.

A shorthand property that sets the font family, font style, and font weight for text.
See the values for font-family, font-style, and font-weight.
See the individual font properties.
All elements that contain text.
Because they share no common values, you can use the family, style, and weight values in any order.
p {font: italic bold "Times New Roman", serif}
The paragraph is displayed in italics, bold, Times New Roman font. If Times New Roman is not available, another serif font is used.

