htmhell.dev · 2d · discuss
by Terence EdenHere's a fun little historic mystery for HTML nerds. Most websites report the language they're written in using the lang attribute. <html lang="en-GB"> But on the <meta> element, it's common to see: <meta content="en_GB" property="og:locale"> Why does that use an underscore rather than a hyphen? What is a language anyway? Here's how the lang attribute works: The lang attribute specifies the primary language for the element's contents and for any of the element's attributes that contain text. Its value must be a valid BCP 47 language tag 3.2.6.2 The lang and xml:lang attributes OK, so what is a...