Doctype is designed to tell browsers which version of HTML to parse instructions. It must be on the first line. In some versions, DTD needs to be introduced. HTML5 does not need DTD.
Chinese random code
The encoding format of browser parsing code is inconsistent with that of source code. For example, if the document is saved as GBK, there will be scrambling code.
To parse in which format, save the code in which coding format.
The above article on HTML DOCTYPE and coding is the editor to share with you all the content, I hope to give you a reference, but also hope that you support more developpaer.