Home  >  Article  >  Web Front-end  >  A brief discussion on HTML doctype and encoding

A brief discussion on HTML doctype and encoding

高洛峰
高洛峰Original
2017-02-11 14:21:261171browse

DOCTYPE

Doctype is to tell the browser which version of html to use to parse instructions. It must be on the first line. In some versions, DTD needs to be introduced. HTML5 does not need to introduce DTD

Chinese garbled characters

Cause

The encoding format of the browser parsing code is inconsistent with the source code encoding format. For example, if the document is saved as GBK, garbled characters will appear

Solution

Whichever format is used to parse, whichever encoding format is used to save the code.

The above article briefly discussing HTML doctype and encoding is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support the PHP Chinese website.

For more articles related to the doctype and encoding of HTML, please pay attention to the PHP Chinese website!

Statement:
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