Second Subtag Rules

If the second subtag is:

  • Two characters long, it’s a country/region defined by ISO 3166[3]

  • Three to eight characters long, it may be registered with the IANA

  • One character long, it is illegal

The ISO 3166 country codes are summarized in Table G-3.

[3] The country codes AA, QM-QZ, XA-XZ and ZZ are reserved by ISO 3166 as user-assigned codes. These must not be used to form language tags.

Get HTTP: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.