I can understand that answer. I’ll put it backs in. I was using browsershots.org and the lynx and opera (in ubuntu) weren’t working. Putting lang=“en” back in may fix those.
Nothing you can see in browsershots will show you anything changing by adding in lang=“en”. However, yes, please keep lang=“en” in!
(lang settings)
is for telling search engines (or someone) what spoke/written in your text will be on your page?
Search engines maybe, screen readers for the blind and low-vision, definitely! They pronounce words, and they will either pronounce the words in your document in their default language setting, OR if you have lang=“somelanguage” then they will (should) pronounce your words in YOUR language.
So if my reader is defaulted to Dutch, and you have an English-content web site without lang=“en”, my reader will try to pronounce your English words as if they were Dutch.
But:
<meta http-equiv=“Content-Language” content=“de, fr, it”/>
Don’t list more than one. Usually a document has one main language. So your content would be “content=de” and any French or Italian words would have their OWN lang attribute:
<html lang=“de”>
…
<body>
<h1 lang=“fr”>Bonjour!</h1>
<p> Komisch, dass erst jetzt, wegen des Plutoniumlecks die japanische Regierung alarmiert ist. Was war die denn vorher? Freudig gespannt??</p>
<p>Im Bahnabteil: “Hör auf, mich zu diskreditieren!” “Diskredi-WAS?” <span lang=“it”>Ciao</span></p>
…</body> etc
(not my German, lawlz, just copied it).
The lang attribute should tell user agents which (human) language is used inside that tag and all of its descendants. Tags outside of that tag should default back to whatever the root element (<html>) or an overriding outside tag is set to.
I usually set both the lang in <html> and meta language tags, mostly just in case there’s a user agent who misses the <html lang=“something”> but sees the meta tag. However I am supposed to be ok with just the lang attribute on <html>.
Since I don’t use XHTML syntax, I don’t use the xml:lang one… but whenever I do have to use XHTML syntax (even though I’m never actually sending the page as XHMTL), I’ll add it in just to be goodie-nice.
And, for as long as this link still shows a broken page, here’s what real XHTML does (don’t look in IE less than 9, doens’t support): [noparse]http://blog.boyet.com/blog/javascriptlessons/javascript-using-a-constructor-without-new/[/noparse]
Notice his code isn’t great, and the page isn’t broken because he forgot the xml:lang attribute or because he was silly and used Transitional doctype (why???), but because of a missing slash.
This is why you’ll never use real XHTML. Unless you can be the most anal person in the world about your code and code perfectly, you won’t want to deal with browsers taking your mistakes at face value like they will if you tell them to.
So why not just stick to HTML4? You can convert all your <br/>'s to <br> in any decent text editor like vim.