WHATWG document对于 HTML5,rel
属性必须包含以空格分隔的值,然后它给出了一个允许值表。
The attribute's value must be a set of space-separated tokens. The allowed keywords and their meanings...
link
元素的允许关键字列表不包括 shortcut
,但包括 icon
。所以我正在查看众所周知的标签
<link rel="shortcut icon" href="/favicon.ico" />
并想知道它是否符合 HTML5。我是否应该从整个网站的该标记中删除关键字 shortcut
?
最佳答案
来自同一个 WHATWG 文档:
For historical reasons, the icon keyword may be preceded by the keyword "shortcut". If the "shortcut" keyword is present, it must be come immediately before the icon keyword and the two keywords must be separated by only a single U+0020 SPACE character.
关于HTML5 `<link rel="快捷图标"/>`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22290504/