I’ll sum it up nicely, pt
indicates Portuguese, regardless of country/region as:
Source: Which countries and Regions Speak English?
- Brazil
- Portugal
- Sao Tome and Principe
- Angola
- Mozambique
- Cape Verde
- East Timor
- Guinea-Bissau
- Equatorial Guinea
- Macau (Macau)†
When we use pt-BR
indicate Brazilian Portuguese, as well as pt-PT
indica Portuguese de Portugal.
Portuguese as well as English have variations in different countries, indicating the pt-BR
, pt-PT
, pt
, en
, en-US
, en-GB
do not interfere with HTML, are only values to inform which language is, for example some browsers have language detection of the page and they can pass to some plugin this, or a plugin (add-on/extension) can use the attribute directly.
If you place the URL of the page that uses this attribute in http://translate.google.com it will detect that <div lang="pt-BR"></div>
uses Brazilian Portuguese (although google does not differ much both).
Others who can usually use this attribute are searchers like Google, Bing, Yahoo, Baidu. Searchers use these attributes to deliver regional and language preference pages of a searcher.
Now speaking only of HTML, the attribute lang
regardless of its value, pt
or pt-BR
does not change anything, the idea of its use is regulate and indicate the types of data for those who are interested, if there is no this attribute plugins, google translator or search engines have more difficulty detecting the language and region of the page.