hreflang vs lang Consistency Checker
Compares the html lang attribute with the main link hreflang value and flags an exact match, the same base language with a different region, or a mismatch.
Result
—
When the page lang and the link hreflang disagree
Two language declarations coexist on an internationalised page: the language attribute on the root element, saying what language the content is in, and the hreflang on alternate links, saying who each version serves. When the two disagree, the search engine receives contradictory information and a screen reader may pronounce the text with the wrong phonetics.
Enter both values and the page compares them. It distinguishes three situations: identical, the desired case; same base language with different regions, which is a warning rather than necessarily an error; and different languages, which is a genuine inconsistency. The distinction matters because Brazilian and European Portuguese, or American and British English, are legitimate cases of regional divergence.
Worth remembering the formatting rules: the language code goes lowercase and the region uppercase, hyphen-separated — the comparison here normalises case, but validation tools complain. And hreflang is reciprocal: if page A points at B, then B must point back at A, or the search engine ignores the pair entirely.
Frequently asked questions
Is a regional divergence always an error?
Do I need the undetermined-language value?
What does the language attribute actually affect?
Related Tools
Heading Hierarchy Validator
Validate the heading hierarchy (H1 to H6) of a page and find out if it skips levels. Improve the accessibility, structure and SEO of your HTML content.
Brazilian Bank Account Validator
Validate Brazilian bank account numbers by check digit for major banks (Bradesco, Itaú, Banco do Brasil, Santander and Caixa). Browser-side verification.
Bitcoin Address Format Detector
Paste an address and read its script type off the prefix: 1 legacy P2PKH, 3 P2SH, bc1q segwit, bc1p taproot, m, n, 2, tb1 testnet. Prefix only, no checksum.
WCAG Keyboard Shortcut Checker
Tests a shortcut against WCAG 2.1.4: a single-character key needs a modifier, a remap or an off switch, while function and named keys fall outside the rule.
CNJ Lawsuit Number Validator
Validates Brazilian CNJ lawsuit numbers by checking the MOD 97-10 check digit and decodes year, court branch, tribunal and originating unit.
Alt Text Length Checker
Check the length of your image alt text against the recommended ~125-character limit. Improve the accessibility and SEO of your website.