From 8a2927ff9911bb833176e3f732a90a107b3954a6 Mon Sep 17 00:00:00 2001 From: DarkPanda <31170176+teamdarkpanda@users.noreply.github.com> Date: Fri, 8 Mar 2019 17:12:51 -0600 Subject: [PATCH] Add Font Family details (#28719) * Add Font Family details * fix: removed unnecessary comment --- .../set-the-font-family-of-an-element/index.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/guide/english/certifications/responsive-web-design/basic-css/set-the-font-family-of-an-element/index.md b/guide/english/certifications/responsive-web-design/basic-css/set-the-font-family-of-an-element/index.md index 265f5d1b58..0ce16aa59a 100644 --- a/guide/english/certifications/responsive-web-design/basic-css/set-the-font-family-of-an-element/index.md +++ b/guide/english/certifications/responsive-web-design/basic-css/set-the-font-family-of-an-element/index.md @@ -3,8 +3,18 @@ title: Set the Font Family of an Element --- ## Set the Font Family of an Element -This is a stub. Help our community expand it. +In CSS, you can define the type of font used as part of a Font Family. It's recommended to include a set of font types, mostly used for fallback mechanism such that when one Font is not available, the system will fallback to render text using the next available font, and so on. -This quick style guide will help ensure your pull request gets accepted. +As a rule of thumb, start by providing font family of your choice and end with commonly available fonts such that if the browser is not able to render text using user specified font, then it will use the generic font type as last resort. - +A few things to keep in mind: +* It is recommended to include more than one font family (mostly for fallback purposes) +* If the name of the font family is more than one word, it must be in quotation marks, like: "Times New Roman" + +```css +p { + font-family: "Times New Roman", Helvetica, serif; +} +``` + +This will advise the browser to render text using ```Times New Roman``` first (if available), and then ```Helvetica``` (if Times New Roman isn't available), and finally ```serif``` if none of the other fonts are available.