HTML LANG and META content-language at the same time?

Dear forum,

I have a HTML 4.01 Strict website that I’m charged with updating.

In the HTML, on line 2 right after the DOCTYPE, I have:

<html lang="en">

A little further down in the HEAD there is also:

<meta http-equiv="content-language" content="en">

Now, it appears to me that one of these should be superfluous. Don’t they both simply tell UA’s that the content is in English?

Should I remove one for simplicity? If so, which one is least important, i.e. which one is least semantic / least supported?

Thanks

The first one:

<html lang="en">

is used for processing content where the second:

<meta http-equiv="content-language" content="en">

is used to specify what the aimed audience is. So as you can see the have a different purpose.

The ‘lang’ attribute has higher precedence but you may also set it with the Content-Language HTTP header they probably have a similar level of support.

Like was mentioned the one on the HTML applies to the content between the HTML element.

Usually you’ll see the ‘lang’ attribute also appear within other elements such as SPAN to target specific language change within a page’s content. For example: <span lang=“es”>Soy un perdedor</span> within a English document. It basically doesn’t harm having both options available.

The lang attribute is read by the browser and the meta tag is read by some search engines