diff --git a/guide/english/css/fonts/index.md b/guide/english/css/fonts/index.md index 437a0e0103..0bfd9dd473 100644 --- a/guide/english/css/fonts/index.md +++ b/guide/english/css/fonts/index.md @@ -7,13 +7,16 @@ The CSS font properties define the font family, weight, size, variant, line heig ### Font family The font family of a text is set by using the `font-family` property. -It works with a *fallback* system, meaning if your browser does not support the first font, it tries with the next one and so on. If the name of the font is more than one word it must be surrounded by quotes. + +It works with a *fallback* system, meaning if your browser does not support the first font, it tries with the next one and so on. If the name of the font is more than one word it must be surrounded by quotes. Either single quotes `(')` or double quotes `(")` can be used. + ```css p { font-family: "Times New Roman", Times, serif; } ``` + In the above example, "Times New Roman" is the of the font, while "serif" is the . Generic names are used as a fallback mechanism for preserving style if the family-name is unavailable. A generic name should always be the last item in the list of font family names. Generic family names are serif, sans-serif, monospace, cursive, fantasy, system-ui. @@ -28,6 +31,7 @@ If you want to use a font that is not downloaded on your computer, you can impor Then you can use the font that you have imported (in this example, 'Lobster') in your code as normal. + ### Font style The `font-style` property can be used to specify italic text.