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
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" />
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>
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)!