Font Family Tag Confusing (v10.00.03)

For general web development questions that are not specifically related to CSS HTML Validator. This includes (but is not limited to) general HTML, CSS, Accessibility, JavaScript, and SEO questions.
Post Reply
paulp575
Rank IV - Intermediate
Posts: 170
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Font Family Tag Confusing (v10.00.03)

Post by paulp575 »

I'm trying to figure out what you are saying when I get this error message:
Typefaces from more than one family were given. Typically, for a consistent look, the typefaces should all be from the same font family. Number of serif family typefaces: 2 ("serif", "times new roman"), sans-serif: 1 ("helvetica"), cursive: 0, fantasy: 0, monospace: 0, other: 0.
---
Here's the stylesheet line that's causing this error message:
FONT-FAMILY: "times new roman",helvetica,serif;
If I change it from serif to sans-serif, I still get the error message! I'm confused!

The primary font I'm, using is times new roman.
I think a chart somewhere on your website (or even in the program) would help!

Thanks,
paulp575
User avatar
MikeGale
Rank VI - Professional
Posts: 726
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Re: Font Family Tag Confusing (v10.00.03)

Post by MikeGale »

The problem here is that the Times family are serifed fonts. Helvetica is a sans-serif (without-serif) font.

In other words the end of the strokes that make up letters are plain in a sans font whereas they're "decorated" in a serifed font.

It's easy to check this out, to see whether you agree with the suggestion that sans-serif and serif are not substitutes for one another. Write two CSS classes, one with each of the font types (don't mix them like you have here). Make two paragraphs on a page with identical text, styled with the different css. Compare them. Are they much alike? Is that what you want to do?
paulp575
Rank IV - Intermediate
Posts: 170
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Font Family Tag Confusing (v10.00.03)

Post by paulp575 »

MikeGale wrote:The problem here is that the Times family are serifed fonts. Helvetica is a sans-serif (without-serif) font.

In other words the end of the strokes that make up letters are plain in a sans font whereas they're "decorated" in a serifed font.

It's easy to check this out, to see whether you agree with the suggestion that sans-serif and serif are not substitutes for one another. Write two CSS classes, one with each of the font types (don't mix them like you have here). Make two paragraphs on a page with identical text, styled with the different css. Compare them. Are they much alike? Is that what you want to do?
While I do understand the difference between serif and sans-serif fonts, I'm only interested in ensuring I get no error messages.
I want to use the default of Times New Roman and whatever other "fall-back" fonts are required by the program.
If I just put in Times New Roman, the program says I need a "generic font." That's the problem - defining a generic font.

I'm sure just about every computer use - at least Windows-based PC - does have Times New Roman, so that should suffice.
paulp575
User avatar
MikeGale
Rank VI - Professional
Posts: 726
Joined: Mon Dec 13, 2004 1:50 pm
Location: Tannhauser Gate

Re: Font Family Tag Confusing (v10.00.03)

Post by MikeGale »

To avoid the message all you need to do is not have a mixture of font families in a single CSS property:

For example:

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

OR

font-family: Arial, Helvetica, sans-serif;

Are fairly reliable if you are going for the basics. (I almost never use serif, it can look awful on some screens. I often go for a more sophisticated list that the above.)

You mixed up the font families in your list.

It's a good idea not to assume too much about what font is where. There are a couple of good resources telling you about font distribution on machines. It's a pretty ugly picture, and it's not improving.

Good luck.
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Font Family Tag Confusing (v10.00.03)

Post by Albert Wiersch »

paulp575 wrote:While I do understand the difference between serif and sans-serif fonts, I'm only interested in ensuring I get no error messages.
I think Mike's last message explains it well. You're mixing a serif font with a sans-serif font and CSE HTML Validator is letting you know. The message should be just a regular (blue) message, not even a warning message and definitely not an error message.

If you're OK with mixing the serif font with the sans-serif font, then you can right-click on the message (when shown in the Results Window in CSE HTML Validator's editor) and disable the message. Otherwise you can get rid of one or the other font names and then use the "generic" font that matches the type of the font-name you are using (either serif or sans-serif).

If you want to use "times new roman", then you could use this:

Code: Select all

FONT-FAMILY: "times new roman", serif;
I hope this helps.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
paulp575
Rank IV - Intermediate
Posts: 170
Joined: Tue Aug 09, 2005 1:20 pm
Location: Spokane WA
Contact:

Re: Font Family Tag Confusing (v10.00.03)

Post by paulp575 »

Albert Wiersch wrote:If you're OK with mixing the serif font with the sans-serif font, then you can right-click on the message (when shown in the Results Window in CSE HTML Validator's editor) and disable the message. Otherwise you can get rid of one or the other font names and then use the "generic" font that matches the type of the font-name you are using (either serif or sans-serif).
I generally try to avoid disabling most of the messages as I would like my code to be as "clean" as possible.
Albert Wiersch wrote:If you want to use "times new roman", then you could use this:

Code: Select all

FONT-FAMILY: "times new roman", serif;
I hope this helps.
Sure did!

Thanks,
paulp575
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Font Family Tag Confusing (v10.00.03)

Post by RSteinwand »

I use the suggestions on this page: http://kv5r.com/web-dev/the-new-font-family

So this would be your Times New Roman list:

Code: Select all

font-family:Cambria,'Times New Roman','Nimbus Roman No9 L','Freeserif',Times,serif;
or you could leave the Cambria off or swap the order

Code: Select all

font-family:'Times New Roman',Cambria,'Nimbus Roman No9 L','Freeserif',Times,serif;
Rick
Post Reply