0
votes

We have a very special question related HTTP meta tags. A content-language meta tag must be added to our website but the platform that we're forced to use doesn't allow us to add it in the expected/correct format that would look like:

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

We are however allowed to add custom tags and thus could add it like:

<meta name="content-language" content="en-US" />

Does anybody know for sure if these two are both valid or does it have to be http-equiv? Thanks in advance for the help!

1
According to developer.mozilla.org/en-US/docs/HTML/Element/meta, http-equiv + content-language is obsolete.j08691
@yunzen Nope, the page isn't HTML5Skorpioh
@j08691 Thanks for pointing me into the right direction. Seems like I'll have to set the lang attribute of the <body> insteadSkorpioh

1 Answers

0
votes

The tag <meta name="content-language" content="en-US" /> is valid markup in XHTML. This does not make it useful. (Just as <meta name="I just invented this!" content="whatever ☺" /> is valid.) There is probably no general-purpose software that pays any attention to it.

Using <meta http-equiv="content-language" content="en-US" /> won’t probably matter anything either. Some browsers may use it to determine the language of the content, in the absence of xml:lang and lang attributes, but this in turn has little if any impact on anything. Declaring the language that way affects the default font in some situations, but how often do web pages let browsers use default fonts?

So the crucial question is what it is that you are supposed to achieve by using such tags.