What to do if html displays garbled characters

coldplay.xixi
Release: 2023-01-05 16:11:27
Original
6350 people have browsed it

The solution to garbled html display 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 to do if html displays garbled characters

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

Solution to garbled html display:

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">
Copy after login

or Abbreviation:

<meta charset="UTF-8">
Copy after login

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">



标题

这是一段测试文本!

Copy after login

Rendering:

What to do if html displays garbled characters

Related learning recommendations: html video tutorial

The above is the detailed content of What to do if html displays garbled characters. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template