]."/> ].">

Home  >  Article  >  Web Front-end  >  What should I do if the html page is garbled?

What should I do if the html page is garbled?

coldplay.xixi
coldplay.xixiOriginal
2021-04-27 14:26:528767browse

The solution to garbled html web pages is to add the [] tag to the head node, declare the characters as [UTF-8], and the code is [<meta http-equiv="Content-Type" content="text/html; charset=utf-8">].

What should I do if the html page is garbled?

The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.

hSolution to garbled tml web pages:

Add the tag to the head node and declare the characters as UTF-8

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Or abbreviation:

<meta charset="UTF-8">

Analysis:

●http-equiv="Content-Type" indicates the description document type

●content="text/ HTML; document type, here is html, if JS is text/javascript,

● charset=utf-8 page character set, encoding, eg: gb2312, iso-8859-1, utf-8

Example:



<meta charset="UTF-8">



标题

这是一段测试文本!

Rendering:

What should I do if the html page is garbled?

Related learning recommendations: html video tutorial

The above is the detailed content of What should I do if the html page is garbled?. For more information, please follow other related articles on 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