Which of the following property sets the font face to be used for text?

font
font-text
font-family
none of the mentioned

The correct answer is: C. font-family

The font-family property sets the font face to be used for text. It takes a list of font family names, separated by commas. The browser will try to use the first font family in the list that is installed on the user’s computer. If the first font family is not available, the browser will try the second font family, and so on.

The font property is a shorthand property for the font-family, font-size, font-weight, font-style, and font-variant properties. It can be used to set all of these properties at once.

The font-text property is not a valid CSS property.

Here is an example of how to use the font-family property:

css
p {
font-family: Arial, sans-serif;
}

This will set the font family for all paragraphs to Arial, sans-serif. If Arial is not available on the user’s computer, the browser will try to use the next font family in the list, sans-serif.

Exit mobile version