Oriel — AI & technology worth noticing, every day.

HTML esoterica – en-GB vs. en_GB

Web page · https://htmhell.dev/adventcalendar/2026/1

First seen by Oriel on .

AI summary

The article explains that HTML language tags use BCP 47 hyphens, while Open Graph’s og:locale uses underscore-separated locale identifiers because it follows older POSIX conventions.

  • The lang attribute describes the language of an element’s content and accepts valid BCP 47 tags such as en-GB.
  • Open Graph defines og:locale as the locale of its metadata, using language_TERRITORY format, such as en_GB.
  • A locale includes language, territory, and conventions for dates, numbers, currency, and other formatting; it is not simply a language.
  • The author traces the underscore to POSIX standardization in ISO/IEC 15897, but finds little explanation for the original choice.
  • The article argues that og:locale has limited value for Open Graph fields and suggests replacing it with lang on individual meta elements.

#html #open graph #bcp 47 #localization

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Points

Score reported by the source.

  • Hacker News: 148, latest observation ; +142 over observed period since
  • Lobsters: 25, latest observation ; +23 over observed period since

Comments

Comment count reported by the source.

  • Hacker News: 38, latest observation ; +38 over observed period since
  • Lobsters: 2, latest observation ; +2 over observed period since

Aliases

SourceExternal IDURL
Hacker News50711763https://www.htmhell.dev/adventcalendar/2026/1/ Read discussion
Lobstersseegdhhttps://www.htmhell.dev/adventcalendar/2026/1/ Read discussion