tags:

views:

71

answers:

5
font:0.5em Georgia,"Times New Roman",Sans-Serif;

What does this mean when someone sets 3 different fonts? Also what is the em mean?

Update: Does the double quotations around Times New Roman mean it is telling CSS to use this first?

+1  A: 

Failover. If you dont have the first one, it tries the second, and so on.

webdestroya
+6  A: 

Multiple fonts indicate an order of preference in fonts to use. In this case, Georgia is the preferred font; if that's not available, use Times New Roman, and finally fall back to Sans-Serif.

em is a relative measure of font size, so in this case it means use half of the "normal" font size.

Mark Rushakoff
Sans-Serif is a family of fonts, not a single font.
Andreas Rejbrand
Actually, em has a specific meaning. One "em" is the width of a capital M in the font and size specified.
Robusto
A: 

Yes. The first installed font is used, so, in your case, the font Georgia is used if installed. If not, Times New Roman is used. If neither of these are installed, then any Sans-Serif font will be used. (Yes, Sans-Serif is not the name of a particular font, but a name for a family of similar fonts, without so-called serifs.)

When it comes to the unit "em", please see W3C Schools.

Andreas Rejbrand
A: 

Alternatives in case of a font isn't installed on the system (if there's no Georgia, go for Times New Roman, ..).

Em is a CSS size unit (http://www.w3schools.com/css/css_units.asp). It's equal to the text size (i.E. browser default, depends on context of course).

svens
I seem to be slow.
svens
+1  A: 

If a font name contains white-space, it should be quoted. Single quotes must be used when using the inline "style" attribute in HTML

Counteragent