{"id":22055,"date":"2013-06-17T10:25:01","date_gmt":"2013-06-17T17:25:01","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=22055"},"modified":"2022-05-31T07:16:02","modified_gmt":"2022-05-31T14:16:02","slug":"font-weight","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/f\/font-weight\/","title":{"rendered":"font-weight"},"content":{"rendered":"\n

The font-weight<\/code> property sets the weight, or thickness, of a font and is dependent either on available font faces within a font family or weights defined by the browser.<\/p>\n\n\n\n

span {\n  font-weight: bold;\n}<\/code><\/pre>\n\n\n\n

The font-weight<\/code> property accepts either a keyword value or predefined numeric value. The available keywords are:<\/p>\n\n\n\n

  • normal<\/code><\/li>
  • bold<\/code><\/li>
  • bolder<\/code><\/li>
  • lighter<\/code><\/li><\/ul>\n\n\n\n

    The available numeric values are:<\/p>\n\n\n\n

    • 100<\/code><\/li>
    • 200<\/code><\/li>
    • 300<\/code><\/li>
    • 400<\/code><\/li>
    • 500<\/code><\/li>
    • 600<\/code><\/li>
    • 700<\/code><\/li>
    • 800<\/code><\/li>
    • 900<\/code><\/li><\/ul>\n\n\n\n

      The keyword value normal<\/code> maps to the numeric value 400<\/code> and the value bold<\/code> maps to 700<\/code>.<\/p>\n\n\n\n

      In order to see any effect using values other than 400<\/code> or 700<\/code>, the font being used must have built-in faces that match those specified weights.<\/p>\n\n\n\n

      If a font has a bold (“700”) or normal (“400”) version as part of the font family, the browser will use that. If those are not available, the browser will mimic its own bold or normal version of the font. It will not mimic the other unavailable weights. Fonts often use names like “Regular” and “Light” to identify any alternate font weights.<\/p>\n\n\n\n

      The following demo demonstrates the use of the alternate weight values:<\/p>\n\n\n\n