The best CSS font-weight property Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,

CSS font-weight property

Examples

Section of a three character set different font weight:

p.normal {font-weight:normal;}
p.thick {font-weight:bold;}
p.thicker {font-weight:900;}


Attribute definitions and instructions

The thickness of the font-weight property of the text of

Defaults: normal
inherit: yes
version: CSS1
JavaScript syntax: object .style.fontWeight = "900"


Browser Support

Figures in the table represent the first browser to support the version number of the property.

属性
font-weight 2.0 4.0 1.0 1.3 3.5

Property Value

value description
normal Defaults. Definition of the standard characters.
bold Defines the bold characters.
bolder Define more rough character.
lighter Finer definition of the character.
  • 100
  • 200
  • 300
  • 400
  • 500
  • 600
  • 700
  • 800
  • 900
Defined characters from coarse to fine. 400 is equivalent to the normal, while the 700 is equivalent to bold.
inherit Provisions should be inherited from the parent element font weight.


related articles

CSS tutorial: CSS the Font

CSS Reference: font properties

CSS font-weight property
10/30