Learn CSS - Typography Cheatsheet - Codecademy
Learn CSS - Typography Cheatsheet - Codecademy
Typography
The CSS font-weight property declares how thick or /* Sets the text as bolder. */
thin should be the characters of a text. Numerical
p {
values can be used with this property to set the
thickness of the text. The numeric scale range of this font-weight: 700;
property is from 100 to 900 and accepts only multiples }
of 100. The default value is normal while the default
numerical value is 400 . Any value less than 400 will
have text appear lighter than the default while any
numerical value greater than the 400 will appear
bolder.
In the given example, all the <p> elements will appear
in a bolder font.
https://www.codecademy.com/learn/learn-css/modules/learn-css-typography/cheatsheet 1/2
15/11/2023 18:32 Learn CSS: Typography Cheatsheet | Codecademy
The CSS font-family property can have multiple fonts /* Here `Arial` is the fallback font for
declared in order of preference. In this case the fonts
<p> tags */
following the initial font are known as the fallback fonts.
If the initial value of the property font-family fails to
p {
load to the webpage, the fallback fonts will be used. font-family: "Helvetica", "Arial";
}
Print Share
https://www.codecademy.com/learn/learn-css/modules/learn-css-typography/cheatsheet 2/2