【问题标题】:While adding google font to my blog in blogger I got error in Header Section在博客中将谷歌字体添加到我的博客时,我在标题部分出现错误
【发布时间】:2019-12-17 06:14:23
【问题描述】:
请帮我解决下图中显示的错误。
上面写着:
Error parsing XML, line 5, column 71: The reference to entity "display" must end with the ';' delimiter
<strike>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"/>
</strike>
【问题讨论】:
标签:
javascript
html
css
blogger
blogs
【解决方案1】:
您需要在 XML 代码中将 & 符号 &amp; 转义为 &amp;。
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"/>
【解决方案2】:
只需将&amp; 更改为&amp;
问题会解决的
【解决方案3】:
html代码会是这样的:
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"/>
为了您的善意,您可以避免 display=swap。我会推荐这个:
<link as='style' href='https://fonts.googleapis.com/css?family=Roboto' media='all' onload='this.onload=null;this.rel='stylesheet'' rel='preload'/>