From e9e85395fba4de1073b45645790b00d63ba36707 Mon Sep 17 00:00:00 2001 From: Tony Scialdone Date: Thu, 29 Nov 2018 15:23:47 -0700 Subject: [PATCH] Update index.md (#23532) Added bit about using single or double quotes Removed extra line breaks --- guide/english/css/fonts/index.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.