views:

222

answers:

1

I have a homepage with the following:

<DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 

My choice of the DOCTYPE "html" is based on a recommendation for html pages using jQuery. My choice of charset=utf=8 is based on a recommendation to make my pages readable on most browsers. But these choices may be wrong.

When I run this page thru the W3C HTML validator, I get messages you see below. Any way I can eliminate the 2 errors?

! Using experimental feature: HTML5 Conformance Checker.

The validator checked your document with an experimental feature: HTML5 Conformance Checker. This feature has been made available for your convenience, but be aware that it may be unreliable, or not perfectly up to date with the latest development of some cutting-edge technologies. If you find any issue with this feature, please report them. Thank you.

Validation Output: 2 Errors

1. Error Line 18, Column 70: Changing character encoding utf-8 and reparsing.

  …ntent-Type" content="text/html; charset=utf-8"> 

2. Error Line 18, Column 70: Changing encoding at this point would need non-streamable behavior.

  …ntent-Type" content="text/html; charset=utf-8"> 
+2  A: 

This error can show up when you don't put the charset declaration right after the opening <head> tag - verify that there's nothing between <head> and the meta tag containing the charset.

Marek Karbarz
http://www.htmlbasictutor.ca/declaring-character-encoding.htm agrees.
Tchalvak