html - 对实体“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/>
解决方案
你的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&id=1"><img src="banner1news.png" width="160" height="725" alt=""></a>
</div>
推荐阅读
- r - Shinydashboard 未在 AWS Shiny-Server 上正确呈现 UI
- c# - Asynchrony with Kafka C# Client
- swift - Why are IBOutlets optionals after swift 5 migration
- email - Send mail from Google Cloud Function using appspotmail.com
- c - 如何将 int 存储在由 malloc 分配的 char * 中
- ruby-on-rails - Rails 中 with_options 的生命周期。为什么不工作?
- sql - 根据其他列条目对 ID 求和
- asp.net-mvc-5 - Could not find a part of the path 'c:\users\dell\documents\visual studio 2015\Projects\CreateCon\CreateCon\Content\Images\1.png'
- xamarin - Is How do I solve the error Event registration is overwriting existing delegate for MKMapView?
- python - Ubuntu 18.04 上的“E:无法找到包 python-pip”