[Wylug-help] More html advice, please

Smylers Smylers at stripey.com
Mon May 26 18:57:10 BST 2008


Anne Wilson writes:

> My question today is about fonts.
> 
> font-family: times new roman;
> 
> Isn't there a generic family name that would be better used?

Hi Anne.  It depends what you mean by "better".  Designers tend to want
thinks to have a very particular appearance -- so if a particular
designer has deemed that Times New Roman is precisely the typeface
that's wanted, then it wouldn't be 'better' for a computer to substitute
a different one.

Part of the aims of CSS (unlike HTML) is to allow just this sort of
control of the output.  There's nothing wrong with specifying Times New
Roman (well, other than it being a pretty boring typeface, one that
works better on paper than screen, and is typically only provided on
Windows systems).

However, you're correct in thinking it's always good to specify a more
generic typeface 'category'.  font-family takes a list of faces; a
browser will use the first it has.  And serif is the category which
includes Times.  So you could do:

  font-family: "Times New Roman", serif;

That means: I'd like to you to use Times New Roman if it's available,
but if not pick the 'default' serif face.  You could list other specific
faces before serif that you'd like the browser to use if one of those is
available and Times New Roman isn't.

Smylers



More information about the Wylug-help mailing list