Setting CSS font weight
The CSS font-weight
property lets you manipulate the boldness of the font:
Example
p {Â Â
 font-weight: normal;
}
a {Â Â
 font-weight: bold;
}
p.thick {Â Â
 font-weight: 780;
}
![DataCamp DataCamp](https://assets.bitdegree.org/online-learning-platforms/storage/media/datacamp-logo-5f96bfc70113e.o.png)
Pros Main Features
- Easy to use with a learn-by-doing approach
- Offers quality content
- Gamified in-browser coding experience
- The price matches the quality
- Suitable for learners ranging from beginner to advanced
- Free certificates of completion
- Focused on data science skills
- Flexible learning timetable
![Udacity Udacity](https://assets.bitdegree.org/online-learning-platforms/storage/media/udacity-review-logo-small.o.png)
Pros Main Features
- Simplistic design (no unnecessary information)
- High-quality courses (even the free ones)
- Variety of features
- Nanodegree programs
- Suitable for enterprises
- Paid Certificates of completion
![Udemy Udemy](https://assets.bitdegree.org/online-learning-platforms/storage/media/udemy-logo-small.o.png)
Pros Main Features
- Easy to navigate
- No technical issues
- Seems to care about its users
- Huge variety of courses
- 30-day refund policy
- Free certificates of completion
CSS font-weight syntax explained
To define custom boldness for the font, you need to define a single value:
font-weight: value;
CSS font weight can be specified in either a keyword or a numeric value.
Value | Description |
---|---|
Numeric values | A unitless number in the range from 1 to 1000 . The higher the number, the bolder the text |
normal |
The default value which is equal to 400 . The text boldness is usual for the chosen font |
bold |
The text is in bold font. Equal to 700 |
bolder |
The text boldness increases |
lighter |
The text boldness decreases |
Browser support
![Browser image](https://www.bitdegree.org/learn/assets/browsers/chrome-logo.jpg)
Chrome
2+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/edge-logo.jpg)
Edge
12+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/firefox-logo.jpg)
Firefox
1+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/ie-logo.jpg)
IE
3+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/opera-logo.jpg)
Opera
3.5+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/safari-logo.jpg)
Safari
1+
Mobile browser support
![Browser image](https://www.bitdegree.org/learn/assets/browsers/chrome-logo.jpg)
Chrome
18+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/firefox-logo.jpg)
Firefox
4+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/opera-logo.jpg)
Opera
10.1+
![Browser image](https://www.bitdegree.org/learn/assets/browsers/safari-logo.jpg)
Safari
1+