Summary
In this CSS lesson, we learned about fonts and found out that:
- Font family is a list of fonts in order of priority, and it sets the font that the browser should display.
- Font weight can have values from
100
to900
, where100
is the thinnest text and900
is the boldest text. - Font size is measured in pixels. For example,
30px
. - Line height effectively sets the spacing between lines and is measured in pixels.
- Text alignment (
text-align
) can have values: left, center, right. - Fonts on the web are divided into safe web fonts, which are supported by every browser. This means we don't need to import them, but there are only a few of them. And then there are web fonts that we need to import, but there is a wider selection of them.
- We import web fonts using the
link
element, which we insert into the HTML header (head
), and then when we want to use the imported font in CSS, we put the font name in quotation marks. For example,“Inter”
.
Instructions
Congratulations on completing the CSS course! You are now ready to create any visually appealing websites you desire!
Start programming for free
9/9