如何找到我必须用于文档的DOCTYPE声明 [英] how can i find which DOCTYPE declaration i have to use for my document

查看:120
本文介绍了如何找到我必须用于文档的DOCTYPE声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到我必须用于文档的DOCTYPE声明...有很多类型,所以我不知道现在必须使用哪种类型,请帮助我

how can i find which DOCTYPE declaration i have to use for my document...there are many types so i dont know which type i have to use now please help me

推荐答案

由于您已将其标记为SEO,所以我假设您要在该上下文中添加DOCTYPE.对于SEO,这无关紧要. SEO不在乎DOCTYPE.但是,您在页面上放置的DOCTYPE将决定事物的翻译方式.如果没有放一个,浏览器就会猜测页面创建的类型,更糟糕的是.

以下是对不同DOCTYPE的说明: http://www.w3schools.com/tags/tag_doctype.asp [ ^ ]

如果不确定,我建议您选择最新的DOCTYPE(HTML5),如果发现问题,请倒退.

以下是有关与SEO相关的DOCTYPE的文章: http://www.pitstopmedia.com/sem/doctype- tag-seo [ ^ ]
Since you flagged this for SEO, I am assuming you are looking to add the DOCTYPE in that context. For SEO, it doesn''t matter. SEO doesn''t care about DOCTYPE. However, the DOCTYPE you put on your page will determine how things are translated. Not putting one lets the browser guess which type your page was created for, which is even worse.

Here is an explanation of the different DOCTYPEs: http://www.w3schools.com/tags/tag_doctype.asp[^]

I would recommend that you choose the most recent DOCTYPE possible (HTML5) if you are unsure and then work your way backwards if you notice issues.

Here is an article about DOCTYPE as it relates to SEO: http://www.pitstopmedia.com/sem/doctype-tag-seo[^]


这篇关于如何找到我必须用于文档的DOCTYPE声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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