Home >Web Front-end >HTML Tutorial >HTML doctype function and encoding
DOCTYPE
Doctype is to tell the browser which version of html to use to parse instructions. It must be located on the first line and needs to be introduced in some versions. DTD, html5 does not need to introduce DTD
Chinese garbled code
Reason
The encoding format and source code encoding of the browser parsing code The format is inconsistent. For example, if the document is saved as GBK, garbled characters will appear
Solution
Whichever format is used to parse, use whichever encoding format is used to save the code.
The above article briefly talking about 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 Script Home.
The above is the detailed content of HTML doctype function and encoding. For more information, please follow other related articles on the PHP Chinese website!