HTML Guide
A U+0000 character (the null character) is not allowed anywhere in HTML documents according to the W3C and WHATWG HTML standards.
Browsers treat the null character as invalid and ignore it, but its presence may indicate a copy/paste problem, text encoding corruption, or an editor issue. U+0000 should be completely removed from the HTML source. Search for and delete any occurrence of this character in your file.
Example of invalid code containing U+0000 (represented as \0
below for clarity):
<p>This is some text with a null character here:\0</p>
Correct, valid example with the null character removed:
<p>This is some text with a null character here:</p>
Ensure there are no null characters in the HTML document by searching for \0
, U+0000
, or using your editor’s “show hidden characters” feature. Save the cleaned HTML and revalidate.