The font family name must be enclosed in quotes

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
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

The font family name must be enclosed in quotes

Post by RSteinwand »

There seems to be a bug here:

<p style="text-align:center;font-family:font-family:'Courier New',Courier,monospace"><b>Username: </b><br /><b>Password: </b></p>

The font family name "font-family:'Courier New'" must be enclosed in quotation marks (single or double) because the name contains spaces, special characters, or doesn't begin with an alphabetic character.
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Post by RSteinwand »

Also this related another warning from the same line:

<p style="text-align:center;font-family:font-family:'Courier New',Courier,monospace"><b>Username: </b><br /><b>Password: </b></p>

The following typeface may not be available on a significant number of browsers: "font-family:'Courier New'". Not recognized at all (check spelling): "font-family:'Courier New'".

Is this still the case? Maybe the chart here best answers that question:
http://nishizhen.cn/80reilly/webdesign/ ... h03_02.htm

Looks like Unix and Mac may not have it. Is that a significant number? I'm guessing less than 5% of our users are on mac/unix/linux.

Sorry to be so fussy, but I wasn't aware of this until I researched it more. I doubt we have many Mac users let alone Unix/Linux.
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: The font family name must be enclosed in quotes

Post by Albert Wiersch »

RSteinwand wrote:There seems to be a bug here:

<p style="text-align:center;font-family:font-family:'Courier New',Courier,monospace"><b>Username: </b><br /><b>Password: </b></p>

The font family name "font-family:'Courier New'" must be enclosed in quotation marks (single or double) because the name contains spaces, special characters, or doesn't begin with an alphabetic character.
Hello,

Try changing it to this (remove the extra "font-family:" text):
<p style="text-align:center;font-family:'Courier New',Courier,monospace"><b>Username: </b><br /><b>Password: </b></p>
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
User avatar
RSteinwand
Rank VI - Professional
Posts: 596
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Post by RSteinwand »

Oh crap. Didn't see that.

Thanks.
Post Reply