Attila Albert Attila Albert - 3 months ago 37
CSS Question

Which property is used to change the font of an element?

I took a CSS quiz at w3schools.com, and I got all of the answers correct except the one below. I tried to search on the subject, but as far as I can see the answer should be correct. Where am I wrong? Really confused with this.


15. Which property is used to change the font of an element?

You answered:

font-family

Wrong Answer!

Answer

The font property is the one that changes all aspects of a font, including family, style and weight. The font-family property only changes the font-family. The family is a group of related fonts (or typefaces).

So 'Comic Sans MS' is a font family, while 'Comic Sans MS Bold 10pt' is a font. In speech, people tend to mix up those terms.