Good evening all. I’m getting a really weird validation error when I validate using the w3c site. The error message is:
Line 1, Column 1: character “” not allowed in prolog
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” "http://www.w3…
The page is http://www.terrellharris.net/dwilliams/index.php/contact/form/
I’m sure that there is something dumb that I am missing. Any help is much appreciated.
Thank you! That was the problem; coincidentally that what was also causing my weird display issue in Safari and Chrome. Odd thing though… I resaved it in my editor and the validator is still saying the BOM is there, despite the fact I told it not to save it. Must be Dreamweaver being oh so friendly to me again. Looks like it’s time to switch to PSPad.
Thanks a ton though Mittineague, I was banging my head on the wall for a while with that.
The character in the “not allowed in prolog” error message
Line 1, Column 1: character “” not allowed in prolog
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN” "http://www.w3.org/TR/html4…
is the
Byte-Order Mark found in UTF-8 File.
The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.
The BOM is a “whitespace” character so you won’t see it, but it’s presence can mess things up.
Maybe this SitePoint article will help?
The Definitive Guide to Web Character Encoding