12CSS basics
CSS Fonts
Easy20MIN
Using CSS fonts allows for modifying the appearance of text on web pages. This can include specifying the font name, size, style, and color. Here are a few examples of using CSS fonts:
Defining the Font Name
You can define the font name in CSS by using the font-family property. For example, if you want to use the Arial font, you can write the following rule:
CSS
1body {
2 font-family: Arial, sans-serif;
3}This rule sets Arial font for the text that is displayed in the body element.
1 / 6
Hakatemia Pro
Learn to hack — start here
Hundreds of interactive courses, virtual labs and CTF challenges in your browser. Start a free trial — no card required.