我使用这个 HTML 标签加载了 3 种不同大小的字体:
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,800,700,400italic|PT+Serif:400,400italic|Bree+Serif">
直到大约 1/2 周前,w3.org 验证器支持 HTML5;现在它给出了这个错误:
Line 14, Column 163: Bad value http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,800,700,400italic|PT+Serif:400,400italic|Bree+Serif for attribute href on element link: Illegal character in query: not a URL code point.
W3C 标记验证器现在不喜欢什么?
URL 对属性 ( )|中的(管道字符)进行编码:href``%7C
|
href``%7C
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,300,800,700,400italic%7CPT+Serif:400,400italic%7CBree+Serif">