Font Properties

Besides the text properties, probably the next most common set of style properties used is the font properties. I'll take a look at them here, starting with the font shorthand property.

font

  • CSS1 values: [[<font-style>||<font-variant>||<font-weight>]?<font-size>[/<line-height>]?<font-family>

  • CSS2 values: caption|icon|menu|message-box|small-caption|status-bar|inherit

  • Default value: Varies

  • Element support: All elements

  • Browser support: [IE3, IE4, IE5, IE6]

  • Style inherited: Yes

This shorthand property indicates font-style, font-variant, font-weight, font-size, line-height, and font-family properties. You list those properties in that order—and without commas between them, except between items in a list of alternate font families. You ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.