html文件中文乱码的解决办法:首先打开会乱码的html文件;然后添加了一行语句为“”即可。

本文操作环境:windows7系统、HTML5&&CSS3版,DELL G3电脑。
html文件中文在浏览器中显示乱码问题解决
利用浏览器打开html文件时,中文显示乱码,如下是原文件的内容
<html>
<head>
<title>狗熊王</title>
</head>
<body>
<p>狗熊王</p><p><span>立即学习</span>“<a href="https://pan.quark.cn/s/cb6835dc7db1" style="text-decoration: underline !important; color: blue; font-weight: bolder;" rel="nofollow" target="_blank">前端免费学习笔记(深入)</a>”;</p>
<p>http://blog.csdn.net/mybelief321</p><div class="aritcle_card flexRow">
<div class="artcardd flexRow">
<a class="aritcle_card_img" href="/xiazai/learn/2910" title="《Freemarker生成静态html文件及中文乱码的问题》"><img
src="https://img.php.cn/upload/webcode/000/000/000/5a3b596bcee94977.png" alt="《Freemarker生成静态html文件及中文乱码的问题》" onerror="this.onerror='';this.src='/static/lhimages/moren/morentu.png'" ></a>
<div class="aritcle_card_info flexColumn">
<a href="/xiazai/learn/2910" title="《Freemarker生成静态html文件及中文乱码的问题》">《Freemarker生成静态html文件及中文乱码的问题》</a>
<p>《Freemarker生成静态html文件及中文乱码的问题》</p>
</div>
<a href="/xiazai/learn/2910" title="《Freemarker生成静态html文件及中文乱码的问题》" class="aritcle_card_btn flexRow flexcenter"><b></b><span>下载</span> </a>
</div>
</div>
</body>
</html>出现乱码
添加了一行 ,如下
<html>
<meta http-equiv="Content-Type"content="text/html;charset=utf-8">
<head>
<title>狗熊王</title>
</head>
<body>
<p>狗熊王</p><p><span>立即学习</span>“<a href="https://pan.quark.cn/s/cb6835dc7db1" style="text-decoration: underline !important; color: blue; font-weight: bolder;" rel="nofollow" target="_blank">前端免费学习笔记(深入)</a>”;</p>
<p>http://blog.csdn.net/mybelief321</p>
</body>
</html>此时就不乱码了
以下是查找的资料:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="zh-CN" /> <meta name="author" content="Csdn" /> <meta name="Copyright" content="Csdn" /> <meta name="description" content="" /> <meta content="" name="keywords" />
第一行说明了他的文字编码
第二行说明了他采用的语言
第三行说明了他的作者
第四行说明了他的版权
第五行是对网站的简单描述
第六行是说明了本网站的关键字
后边两行主要是被百度这些搜索网站检索的时候用的 非常重要
【推荐学习:HTML视频教程】










