首页 > 解决方案 > 对实体“id”的引用必须以“;”结尾 分隔符

问题描述

问题是我无法将此横幅发布到我的博客中,并且错误消息是主题中的内容。我正在尝试用这个更新模板。我没有看到任何遗漏;但我今天犯了更愚蠢的错误,所以谁知道呢。

<div> id="RightFloatAds;" style="right: 0px; position: fixed; text-align: center; top: 65px; background-color:black;color:black;border:5px; solid; black;"><a target="_blank" href="http://www.ramycapital.ca/?p=subscribe&id=1"><img src="banner1news.png" width="160" height="725" alt=""><div/>

标签: htmlbanner

解决方案


你的html有很多问题......

首先,HTML 元素的属性必须在元素名称之后和之前><div id="blah" otherattribute="value">

其次,;属性ID不允许。

第三,你失踪了</a>,而不是关闭</div>你有无效</div>

最后尽量避免使用内联样式,当然如果可能的话,使用 CSS 代替。

<div id="RightFloatAds" style="right: 0px; position: fixed; text-align: center; top: 65px; background-color:black;color:black;border:5px solid black;">
  <a target="_blank" href="http://www.ramycapital.ca/?p=subscribe&amp;id=1"><img src="banner1news.png" width="160" height="725" alt=""></a>
</div>


推荐阅读