为什么不能& lt; style& gt;HTML& lt; body& gt;中的标记标签在W3C上验证? [英] Why can’t <style> tags within the HTML <body> tag validate on W3C?

查看:54
本文介绍了为什么不能& lt; style& gt;HTML& lt; body& gt;中的标记标签在W3C上验证?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
< STYLE>必须位于< HEAD>中HTML文档?

我是开发CMS系统的团队的一部分.

I am part of a team that has developed a CMS system.

我们希望能够以验证W3C标准的方式将< style> 标签插入HTML页面的&body; 验证是我们的SEO顾问的要求.

We would like to be able to insert <style> tags within the <body> of an HTML page in a way that validates to W3C standards, as validation is a requirement of our SEO consultant.

style标签在所有浏览器的body标签中都可以很好地工作,但是它拒绝验证.

The style tag functions perfectly well within the body tag across all browsers, yet it refuses to validate.

推荐答案

HMTL DTD不允许这样做,因此无法验证.没关系,所有浏览器都支持它.

The HMTL DTD does not allow it, therefore it doesn't validate. Doesn't matter, all browsers support it anyway.

这篇关于为什么不能&amp; lt; style&amp; gt;HTML&amp; lt; body&amp; gt;中的标记标签在W3C上验证?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆