Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

font-weight

Sets the weight of the font of the object.

{ font-weight:sWeight }

sWeight

String that specifies or receives one of the following values:

normal

Font is normal.

bold

Font is bold.

bolder

Font is at least as bold as the default bold weight.

lighter

Font is lighter than normal.

100

Font is at least as light as the 200 weight.

200

Font is at least as bold as the 100 weight and at least as light as the 300 weight.

300

Font is at least as bold as the 200 weight and at least as light as the 400 weight.

400

Font is normal.

500

Font is at least as bold as the 400 weight and at least as light as the 600 weight.

600

Font is at least as bold as the 500 weight and at least as light as the 700 weight.

700

Font is bold.

800

Font is at least as bold as the 700 weight and at least as light as the 900 weight.

900

Font is at least as bold as the 800 weight.

This property has no default value. It is inherited.

Keywords for font-weight values are mapped to specific font variations depending on the fonts that are installed on the user's computer. In many cases, the user cannot see the difference between different font-weight settings because the operating system chooses the closest match.

Setting the font-weight to 400 is equivalent to normal, and to 700 is equivalent to bold. A font-weight of bolder or lighter is interpreted relative to the weight of the parent object. A value of bolder for text whose parent is normal weight sets the text to bold.

The following example uses the font-weight property to change the font weight. This example uses the LI element as a selector in an embedded (global) style sheet to set the font weight to bolder:

<style>
li {font-weight:bolder}
</style>

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, DEFAULTS, DFN, DIV, DL, DT, EM, FIELDSET, FORM, HN, HTML, I, IMG, INPUT TYPE=BUTTON, INPUT TYPE=CHECKBOX, INPUT TYPE=FILE, INPUT TYPE=IMAGE, INPUT TYPE=PASSWORD, INPUT TYPE=RADIO, INPUT TYPE=RESET, INPUT TYPE=SUBMIT, INPUT TYPE=TEXT, LI, OL, P, S, SELECT, SPAN, SUB, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

Concepts

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.