Forum Moderators: open
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
No surprise that it didn't validate as it's apparently xhtml, not html. I just tried to find out what line of code, I'll have to use for html, but searching for it only gives me strange results (because I'm using search phrases including the word "language" and html is a "language", too, I guess....) and one document that's about 100 of pages long on how to deliver internationalized html/xhtml, which I hope I don't have to read to get this one right!
What can I use so the browser understands the language is English (or German..or French...etc.) if I'm coding in html 4.01?
Thanks!
EDIT: I just realized that my document validated, despite the fact that I removed the line of code above. Thus I had absolutely no <html> in all of my code, only a </html> at the end of it! Does the validator, not "get" this kind of stuff? I'm surprised, because if there's a </html> in the code, shouldn't it realize that the <html> is missing...or that a <html> has to be at the beginning of the code in the first place for it to validate as html 4.01?
<html lang="en"> I just realized that my document validated, despite the fact that I removed the line of code above. Thus I had absolutely no <html> in all of my code, only a </html> at the end of it! Does the validator, not "get" this kind of stuff?
The
html element is optional in HTML, so the validator is correct in not marking its absence as an error. :)