| font-size |
| The display of text elements such as headings, notes, and paragraphs are controlled by the Font Properties. This is the most common type of formatting used with Style Sheets. There are five font properties, as listed below. Each font property has its own array of values.
• font-style Sets the font style (ie: italic) • font-variant Sets the font case (upper, lower, small-caps) • font-weight Sets the font to lighter or bolder • font-size Sets the font size • font-family Sets the type of font (font face) used font-size This property is used to set the size of the displayed text, and has four value types available for use. font-size values absolute size This font-size type assigns the size of the font using seven values, these values being: xx-small x-small small medium - medium is the normal, or default, size of the font large x-large xx-large The absolute size value is dependant on the existing text size settings of your visitor's browser. That is, if your visitor has his browser text size set to 14, the medium font-size takes on the value of 14 as well. All all other text sizing, whether larger or smaller, will be proportional to this default (medium) value. syntax {font-size: xx-small} ... etc ... {font-size: xx-large} relative size The relative font-size values are similiar to absolute sizing, though with less control. The options are larger or smaller, and are measured in relation to the parent container in which it was first used, regardless of any BODY font-size settings. That is, the relative font-size settings are measured on inherited values. Relative values scale easier than the other font-size types. syntax {font-size: smaller} length This value type uses several different measurement options. Each measurement option has its own abbreviation, as follows: • mm millimeters. • cm centimeters. • in inches. • pt points, which is a way of measuring the font size. One point is 1/72 (one seventy-second) of an inch. • pc picas, which is yet another way of measuring font size. One pica is equal to 12 points. • px pixels, which is one screen element. The display you're looking at is comprised of thousands of individual dots, each of which can change in color and luminosity to achieve the desired image. Each of these dots is referred to as a pixel. • ex x-height settings, which is the height of the font's lower case letter 'x'. • em em setting, which is the normal height of the font. Millimeters, centimeters, inches, points, and picas are considered to be absolute lengths because you're specifying the exact size of the type. Relative units such as em and ex are interpreted as references to the parent font size. syntax {font-size: 20pt} percentage This is a relative measurement, which is dependant on the text size of its parent container. It is expressed as a number followed by a percent sign. syntax {font-size: 120%} EXAMPLES: OL {font-size: 1.5em} This example specifies that the text content of the ordered list is to be one and a half times larger than the normal, unaltered size of the font. BODY {font-size: 15pt} This example sets the base font size of the entire document to 15 point text. This is an absolute size. All relative sizes (ex, em, percentage) will be rendered in relation to this font size. P {font-size: 80%} This example sets the text to be entered between all instances of the paragraph tag (P) to be 80 percent of the default text size. |