BOM or mysterious character & # 65279;
Today we will talk about one very insidious thing - the & # 65279; symbol, which is Hell for layout designers. This is an "incomprehensible" line break at the top of the page, and all the content of the head "moves" to the body, and in the inspector we can see the following (Fig. 1), the most "interesting" is that if you view the page code in a separate tab (usually CTRL + U) everything is there as it should be.
The fault is BOM (Byte Order Mark) - the character, or rather the html encoding of the UTF-8 BOM document.
To fix this, you need to resave the document to UTF-8 without the BOM.
This can be done in several ways:
- Using Notepad ++ or another editor that can change the encoding of the document, you need to save the file in UTF-8 encoding without BOM (Fig. 2)
- If you do not know which file contains the same BOM mark, you can use the script to find and remove the BOM mark from documents. Save the following script in the root of the site under the name BOM.php and go to http://you_site.com/BOM.php (! IMPORTANT make a backup before executing).
And the & # 65279; should disappear.
Good luck :)