Home > Web Front-end > HTML Tutorial > What do you use for the DOCTYPE of your website now? Novice asking for advice_html/css_WEB-ITnose

What do you use for the DOCTYPE of your website now? Novice asking for advice_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:00:27
Original
989 people have browsed it

I just started learning it and I don’t quite understand this thing. How should I use DOCTYPE?
I have seen that the words "DOCTYPE" on many current websites start with . I would like to ask, if I build a website now, can I use this DOCTYPE? Can it achieve good compatibility?


Reply to discussion (solution)


Just use this, everything is compatible.
For the reason why ie6 can parse, see this link: http://i.wanz.im/2010/05/28/why_doctype_html/
It is very useful. Professionally speaking: if the first line of the page is not When this happens, the IE browser, CSS, and JS will be expressed in a non-standard way, and the page will not be the result that everyone expects.
If this appears in the first line, then IE will parse it according to the agreed specifications, and the page will be the one everyone expects.

This is the statement of html5. If you choose to use html5 development, then use it
Specifically choose which statement, According to the needs of the website
The following is a detailed introduction of the W3C statement on . You can check it out
http://www.w3school.com.cn/tags/tag_doctype.asp

Want to advance Just use HTML5.

<!Doctype HTML>
Copy after login


For normal use, use the transitional version of XHTML. The strict version is too strict.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template