JSSTag.fontWeight (Property)

The weight of a font for an object. This is otherwise known as the boldness.


CSS level - 1
JavaScript - 1.2
Netscape - 4.0
Property/method value type:String primitive
JavaScript syntax:NmyJSSTag.fontWeight
NmyJSSTag.fontWeight = aWeight
CSS syntax:font-weight: aWeight
HTML syntax:<FONT WEIGHT="...">
Argument list:aWeightA font weight control value

The JSSTag.fontWeight property corresponds to the font-weight CSS property.

This property controls the weight of the characters on the screen. this is sometimes called boldness although it provides a much finer level of control than simply using a bold tag. The following numerical values select a progressive weight increase:

These keywords select a pair of reasonably similar settings across platforms:

The normal setting is equivalent to 400 and the bold setting matches 700.

In addition there are two relative boldness controls:

Not all font families support as wide a range of possible weights as the fontWeight property can control. Nevertheless, the browser makes its best efforts to deliver the requested appearance.

The default value for this property is "normal".

This value is inherited from its parent container element.


See also:Measurement units, style.fontWeight