The spec says "font" should be "[ [ <‘font-style’> || <font-variant-css21> || <‘font-weight’> || <‘font-stretch’ ]? <‘font-size’> [ / <‘line-height’> ]? <‘font-family’> ] | caption | icon | menu | message-box | small-caption | status-bar
These values should (optionally) come before the font-size: [ <‘font-style’> || <font-variant-css21> || <‘font-weight’> || <‘font-stretch’ ]?
So the font-weight (bolder
in the code example) should come before the size (13px
), not after it. CSE HTML Validator
sees the size, then assumes the rest of the font value are font-family names.
It's an interesting situation. If CSE HTML Validator
was to generate a more specific message, then it would have to make the assumption that certain font-family names (or parts of them) are instead suppose to be something other than font-family names since it wouldn't be able to know this for sure. There could actually be a font named "bolder Arial" on someone's system.
I suppose it is something to keep in mind for a future update.
But this should be used instead:
Code: Select all
font: bolder 13px Arial,Helvetica,sans-serif;