DOCTYPE声明是否必须是HTML文档中的第一个标签? [英] Does the DOCTYPE declaration have to be the first tag in an HTML document?

查看:171
本文介绍了DOCTYPE声明是否必须是HTML文档中的第一个标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当客户端请求页面时,我们的安全管理器会在每个html页面的顶部动态插入一些javascript。它被插入到DOCTYPE语句的上方。我认为这可能是我遇到布局问题的原因。

Our security manager dynamically inserts a bit of javascript at the top of every html page when a page is requested by the client. It is inserted above the DOCTYPE statement. I think this might be the cause of the layout problems I am having.

对任何人有想法吗?

推荐答案

是的,DOCTYPE必须是页面上的第一个数据: http:/ /www.w3schools.com/tags/tag_DOCTYPE.asp

Yes, DOCTYPE must be the first data on the page: http://www.w3schools.com/tags/tag_DOCTYPE.asp

这篇关于DOCTYPE声明是否必须是HTML文档中的第一个标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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