Msg#: 4677448 posted 3:14 pm on Jun 4, 2014 (gmt 0)
What's your DOCTYPE? That does affect the correct format for the tag. The tag in the format you have is correct for <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> though "Content-Type" doesn't need caps.
Msg#: 4677448 posted 3:38 pm on Jun 4, 2014 (gmt 0)
That would be the same as for 4.01 Trans. This is exactly what I get for a new page setup using 4.01 Strict: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> The only difference I see is the capitalization differences. (I'm using BBEdit to give me that and haven't had validation issues - though I never used a 4.01 Strict because it seemed "overly picky" to me.)
Msg#: 4677448 posted 5:43 pm on Jun 4, 2014 (gmt 0)
Little-known detail: the w3 validator is actually far stricter haha than the HTML4 standard. So, for example, it will kick up a fuss about capitalized tags like <H1> or <BR>, and will point out when a <p> or <td> isn't closed, even though they aren't strictly required. Conversely, one time I accidentally left off the closing </body> </html> and the validator didn't say a word. Go figure.
Msg#: 4677448 posted 11:07 pm on Jun 4, 2014 (gmt 0)
I'd recommend using the latest version of the W3C validator, which uses the same HTML parser as that used in all modern browsers (the same parser code is actually used in Firefox). The old W3C validator is no longer maintained, and is DTD-based so cannot check all HTML constraints.
You could also switch to the the HTML5 doctype <!doctype html> - the way browsers process your pages will not change, as they are already parsing it as "HTML5", but it does affect the rules validators use to check your pages. You could also use the charset parameter instead of the "content-type" directive, as the text/html bit is ignored anyway.
Again this shouldn't affect your pages as this is the way browsers are already parsing your pages, it's just cleaning up some old SGML talismans from 1999 that don't affect anything :) So the start of your pages would be: