" before the head; 2. Modify the encoding of the file itself to UTF8; 3. Modify the database connection encoding is UTF8."/> " before the head; 2. Modify the encoding of the file itself to UTF8; 3. Modify the database connection encoding is UTF8.">

Home  >  Article  >  Web Front-end  >  What to do if the html title is garbled

What to do if the html title is garbled

藏色散人
藏色散人Original
2021-06-03 10:42:455780browse

html The solution to the garbled title: 1. Add "9e7d7ff9002a68a223ceef1b33f976d5 before the head; 2. Modify the encoding of the file itself to UTF8; 3. Modify the database connection encoding to UTF8.

What to do if the html title is garbled

The operating environment of this article: Windows 7 system, HTML5 version, Dell G3 computer.

html Solution to the garbled title problem in web pages

1. Statement problem

Put the following sentence between the heads, and the title should be placed below this sentence

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

Must be utf-8. If you accidentally write it as utf8, it will be fine in Safari, but it will still be garbled in IE

2. The encoding problem of the file itself

Edit the web page file with text Open the browser, right-click and save as, select the encoding format as UTF-8

3. Database connection encoding problem

If the web page setting encoding is gbk, and the database storage data encoding format is UTF-8 Yes, at this time, the program can query the database data and perform program transcoding before displaying the data.

[Recommended learning: html video tutorial]

The above is the detailed content of What to do if the html title 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