CSS font-weight

The CSS font-weight property selects the weight of the font. The keyword normal is synonymous with 400, and bold is synonymous with 700. Values from 100 to 900 can also be used.

CSS property font-weight

CSS version: CSS 2.1
Value: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit
Initial: normal
Applies to: all elements
Inherited: yes

Example – font-weight

In the following code, CSS property font-weight can be changed to the following values
  • normal
  • bold
  • bolder
  • lighter
<style type="text/css">
div {
  width: 100px;
  font: 14px/18px sans-serif;
  font-weight: normal;
}
</style>
<div>This is sample text to test font-weight property</div>
font-weight refresh

Related

Specification

Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments