html lang

0

Mam takie dociekliwe pytanie, na stronach widzę rożne stosowanie atrybutu lang lub jego brak, jakie jest najpoprawniejsze, może mi ktoś wytłumaczyć ?

<html>
<html lang="pl">
<html lang="pl-pl">
<html lang="pl-PL>

Może jeszcze inne?

1

https://www.w3.org/International/questions/qa-html-language-declarations

Use language tags from the IANA Language Subtag Registry. You can find subtags using the unofficial Language Subtag Lookup tool.

0

W RFC 5646 napisane jest:

Although case distinctions do not carry meaning in language tags,
consistent formatting and presentation of language tags will aid
users. The format of subtags in the registry is RECOMMENDED as the
form to use in language tags. This format generally corresponds to
the common conventions for the various ISO standards from which the
subtags are derived.
These conventions include:
o [ISO639-1] recommends that language codes be written in lowercase
('mn' Mongolian).
o [ISO15924] recommends that script codes use lowercase with the
initial letter capitalized ('Cyrl' Cyrillic).
o [ISO3166-1] recommends that country codes be capitalized ('MN'
Mongolia).
...
Language-Region:
de-DE (German for Germany)
en-US (English as used in the United States)

Poczytałem chyba zrozumiałem, że używamy <html lang="pl">
nie używamy znacznika dla regionu PL, bo to bezsensu.

1 użytkowników online, w tym zalogowanych: 0, gości: 1