Home > Web Front-end > CSS Tutorial > In order to prevent garbled characters, please put the meta charset used for page encoding in front of the title_Experience exchange

In order to prevent garbled characters, please put the meta charset used for page encoding in front of the title_Experience exchange

PHP中文网
Release: 2016-05-16 12:06:43
Original
1435 people have browsed it

when many novices create web pages, they sometimes find that the website title is garbled. here is the method, which is also a standard to prevent errors
usually the order we place is title first, then charset, like the following:

the code is as follows:

< title>我的页面php中文网www.php.cn</title>   
< meta http-equiv="content-type" content="text/html; charset=gb2312" />
Copy after login

now please reverse their order:

the code is as follows:

< meta http-equiv="Content-Type" content="text/html; charset=gb2312" />   
< title>我的页面PHP中文网www.php.cn</title>
Copy after login


the purpose of this is to consider that when the page is loading, it is loaded from top to bottom. in order to prevent your page from appearing garbled (in the title) under special circumstances, then put put charset in front, the browser will know the encoding of your page, and will display your page title and page content according to your encoding.

the above is to prevent garbled characters. please put the meta charset used for page encoding in front of the title_experience exchange content. for more related content, please pay attention to the php chinese website (www.php.cn)!


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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template