The w3.org validator is giving me an error on the following line:
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
This is the full error it gives:
Line 1, Column 727: Bad value
shortcut iconfor attribute rel on element link: The stringshortcutis not a registered keyword. The stringshortcutis not an absolute URL.…f="/favicon.ico" type="image/x-icon" />
Syntax of link type valid for :
A whitespace-separated list of link types listed as allowed on in the HTML specification or listed as an allowed on on the Microformats wiki without duplicate keywords in the list.
You can register link types on the Microformats wiki yourself.
Syntax of absolute IRI: An absolute URL.
For example: http://example.org/hello, but not /hello. Spaces should be escaped as %20.
What I don't understand is that I'm following the HTML5 spec which says:
For historical reasons, the
iconkeyword may be preceded by the keyword "shortcut". If the "shortcut" keyword is present, it must be come immediately before theiconkeyword and the two keywords must be separated by only a single U+0020 SPACE character.
I see that it is suggesting the %20 as a space, which I've tried:
<link rel="shortcut%20icon" href="/favicon.ico" type="image/x-icon" />
But when I use this code, the error I get is nearly the same, except it starts out:
Error Line 1, Column 729: Bad value
shortcut%20iconfor attribute rel on element link: The stringshortcut%20iconis not a registered keyword. The stringshortcut%20iconis not an absolute URL.
Seems to be an issue with the W3C validator. All my HTML5 projects – they were valid last week – throw the same error as mentioned today. Using an alternative validator (e.g. the Validator.nu (X)HTML5 Validator) everything is fine.
I received this message today from Steve Faulkner.
It was due to a bug in the validator, its has been fixed and will be pushed tomorrow.
Steve Faulkner
TPG Distinguished Accessibility Engineer
-
Co-editor HTML 5.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With