Nonspatial symbols were found without seeing the doctype first. Expected <! DOCTYPE html>

I checked my HTML5 webpage on w3c validator and got errors

"Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>"

      

But as you can see, I have my doctype in the first place. I found a post here HTML Validation Error: Characters without spaces found before DOCTYPE say something about spec files. I'm not sure if there might be BOM files in my source code.

Is there a way to find recursive BOM files for a given directory using unix commands?

Is there any other reason why the mentioned errors are showing to me?

UPDATE:

As the observer said, according to the command

grep -rl $'\xEF\xBB\xBF' .

      

from the topic An elegant way to find UTF-8 files from a BOM? there is no BOM source in the source code. So it probably doesn't matter for BOM files and there must be something else causing this error.

+3


source to share


1 answer


Your pages literally contain a line Cannot detect language.

before your DOCTYPE.

It doesn't seem to be contained in the HTML that has been delivered to all browsers, all the time. I just saw it from the Web (formerly Epiphany) , but now it's gone.



Loading the page from Wget or cURL might still show this to you (still to me).

+1


source







All Articles