Comment: HTML5 UTF-8 has garbled Chinese characters, so many friends should have encountered them. Write them in notepad, and after saving, it appears garbled on the web page. If it is replaced with GB2312, it can correctly display Chinese. Let’s discuss the specific solutions for you.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 title</title>
</head>
<body>
<p>HTML5 content! Hello</p>
</body>
</html>
Written in notepad, after saving, it will run on the web page, and it will appear garbled. If you change it to GB2312, you can correctly display Chinese.
If there is no problem with the code, the problem will be on the notes itself. <meta charste=utf-8> just tells the browser to use utf-8 to explain, and the encoding of the document is determined by your choice when saving. If you save ANSI and then use utf-8 to explain, it will definitely be garbled. In Notepad, the default saved file format is ANSI, so it must be modified to uif-8 when saving.