W3 因
我的应用程序运行良好,但我希望能够在 W3 上完全验证它。
我的问题很简单。我正在使用 Bing JS API 将 Bing 地图附加到 Div 标签。在该 Div 标记中,我有一个 元素,如果禁用 javascript,该元素会调用 MultiMap 静态地图提供程序。我选择这样做的原因是,如果我不打算实际使用 MultiMap API,我就不想调用它。
有没有其他方法可以做到这一点,以便我可以成为 W3 HTML5 有效的?
<div id='bingMap' class="largeMap">
<noscript>
<img src="http://developer.multimap.com/API/map/1.2/xxxxxxxxxxxxxxx?zoomFactor=11&width=550&height=400&lat_1=51.18468&lon_1=-114.497999&lat_2=51.169858&lon_2=-114.32549&lat_3=51.083277&lon_3=-114.203964&lat_4=51.063097&lon_4=-114.092031&lat_5=50.939664&lon_5=-113.973568" />
</noscript>
</div>
I've got my application working great, however I'd LOVE to be able to have it validate completely on W3.
My problem is quite simple. I'm using the Bing JS API to attach a Bing Map to a Div tag. Within that Div tag, I have a <noscript>
element that calls the MultiMap static map provider IF javascript is disabled. The reason I've chosen to do it this way is because I don't want to call the MultiMap API if I'm not going to actually use it.
Is there an alternative way to do this so that I can be W3 HTML5 valid?
<div id='bingMap' class="largeMap">
<noscript>
<img src="http://developer.multimap.com/API/map/1.2/xxxxxxxxxxxxxxx?zoomFactor=11&width=550&height=400&lat_1=51.18468&lon_1=-114.497999&lat_2=51.169858&lon_2=-114.32549&lat_3=51.083277&lon_3=-114.203964&lat_4=51.063097&lon_4=-114.092031&lat_5=50.939664&lon_5=-113.973568" />
</noscript>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这也许是:
This perhaps:
将
包装到 div、p 或其他块元素中。
只允许将块元素作为直接子元素。
wrap the
<img/>
into a div, p or another block-element.<noscript>
is only allowed to have block-elements as direct child.我建议删除 xmlns 以防止它将您的代码解释为 XHTML5(而不是 HTML5),因为 XHTML5 只是 HTML5 的更严格版本,不允许使用许多功能。 HTML5仍然支持XHTML风格的标签,所以没有损失。
像下面这样的东西会起作用:
I would suggest taking out the xmlns in order to prevent it from interpreting your code as XHTML5 (as opposed to HTML5) as XHTML5 is just a stricter version of HTML5 disallowing many features. HTML5 still supports XHTML-style tags, so no loss.
Something like the following would work:
以下内容在 http://validator.w3.org/check 上对我进行了验证
The following validates for me at http://validator.w3.org/check