html中style和type的作用,HTML – Content-Script-Type和Content-Style-Type的重点是什么

< script>和< style>元素只是向HTML添加脚本和样式的一种方式.

对于脚本,我们有事件处理程序属性,为样式HTML 4.01定义< link> element,Link:HTTP标头和“style”属性.在每种情况下,都没有强制指定语言,因此后退将是Content-Script-Type和Content-Style-Type的值.

例如:脚本部分说:

Documents that do not specify default

scripting language information and

that contain elements that specify an

intrinsic event script are incorrect.

User agents may still attempt to

interpret incorrectly specified

scripts but are not required to.

Authoring tools should generate

default scripting language information

to help authors avoid creating

incorrect documents.

和造型部分有一个等同的声明:

Documents that include elements that

set the style attribute but which

don’t define a default style sheet

language are incorrect. Authoring

tools should generate default style

sheet language information (typically

a Meta declaration) so that user

agents do not have to rely on a

default of “text/css”.

请注意,这些要求不是DTD可表达的,因此依赖于DTD的验证器不会将违规标记为错误.

是否有任何浏览器实际关注设置,我不知道.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值