If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

CSS: The font-family property

The font-family property specifies the font family of the text, which changes how the letters look.
A specific font name can be specified, like font-family: "Arial", but that will only work if viewers also have "Arial" on their computer. It's better to specify a generic family name (serif, sans-serif, monospace, cursive), because then browsers will look for that sort of font on the viewer's computer.
The best option is to give a comma separated list of font families, as then the browser will prefer the first but use the others as backup options.

Want to join the conversation?

No posts yet.