HTML lang Attribute

暫定日本語訳:何 HTML lang attribute does, なぜ Google ignores it 向けに 言語 detection ただし Bing 使用 it, どのように it differs から hreflang, と なぜ it still matters 向けに accessibility と ブラウザー auto-translate prompt.

初回公開:2026年7月2日 · 最終更新:2026年8月4日 · Advanced
言語
このページには証拠シグナルが1件あります

暫定日本語訳:HTML lang attribute — 設定 on root as <html lang="en"> (または 地域 variant like en-US) — declares natural 言語 of この document's コンテンツ using BCP 47 tag. It is ない 同じ as hreflang: lang describes ページ it's on; hreflang declares alternate-言語 URLs 向けに other ページ. Google is blunt その it ignores lang 向けに 言語 detection ('私たち don't 使用 その at all… almost 常に 誤った' — Mueller); it 使用 コンテンツ アルゴリズム instead. Bing is opposite: its 2011 Webmaster Blog names <html lang> as fallback document-ロケーション signal, behind コンテンツ-言語 meta tag. Regardless of 検索 weight, lang is 必要 accessibility attribute (WCAG 3.1.1) — it drives screen-reader pronunciation と ブラウザー's auto-translate prompt, と 'missing document language' is still top-six WebAIM Million failure. one Google carve-out: labeling machine-translated blocks とともに lang="es-x-mtfrom-en". 設定 有効 value, 保つ it consistent とともに hreflang, と don't leave boilerplate lang="en" on non-English コンテンツ.

暫定日本語案: TL;DR — lang declares natural 言語 of この document (<html lang="en">, or a region variant like en-US) using BCP 47 tag. It is 暫定日本語案: 異なる mechanism から hreflang, which declares alternate-言語 URLs — 暫定日本語案: Google’s own docs group two together as things it does ない 使用 へ detect 暫定日本語案: ページ’s 言語. Mueller: “we don’t use that at all… almost always wrong.” 暫定日本語案: Regardless of 検索 weight, programmatically determinable ページ 言語 is 暫定日本語案: WCAG 3.1.1 Level requirement, と HTML lang attribute is standard 暫定日本語案: technique. It supports 暫定日本語案: screen-reader pronunciation と ブラウザー auto-translate prompt, と “missing document language” is still top-six WebAIM Million failure. one Google 暫定日本語案: carve-out: labeling machine-translated blocks とともに lang="es-x-mtfrom-en". 設定 暫定日本語案: 有効 value, 保つ it consistent とともに hreflang, と kill boilerplate 暫定日本語案: lang="en" on non-English ページ.

何 lang attribute actually declares

暫定日本語案: HTML lang attribute is global attribute — it できる technically go on any 暫定日本語案: element — ただし one その matters 大半の sits on root: <html lang="en">. Its 暫定日本語案: value is BCP 47 言語 tag, either 言語 subtag on its own (en, 暫定日本語案: es, de) または 言語-plus-地域 pair (en-US, en-GB, pt-BR, zh-Hans).

暫定日本語案: 何 it declares is narrow と specific: * natural 言語 of text コンテンツ 暫定日本語案: on document it’s 設定 on.* ない 言語 of あなた alternate ページ, ない 暫定日本語案: 国 あなた’re targeting — just “the words on this page are in this language.”

Evidence for this claim The HTML lang attribute specifies an element's language using a valid BCP 47 language tag; on the root html element it establishes the document's default language. Scope: WHATWG HTML language semantics and IETF BCP 47 tag syntax. Confidence: high · Verified: WHATWG: The lang attribute IETF RFC 5646 Evidence for this claim WCAG 2.2 success criterion 3.1.1 requires the default human language of a page to be programmatically determinable, and W3C lists lang on the html element as a sufficient HTML technique. Scope: WCAG 2.2 Level A language-of-page requirement for HTML documents. Confidence: high · Verified: W3C: Understanding Language of Page

暫定日本語案: Three precision points worth internalizing, drawn から 暫定日本語案: MDN reference:

  • 暫定日本語案: 有効 values だけ. BCP 47 tag — ない made-up three-letter code (eng), 暫定日本語案: ない full 言語 name, と ない en-UK ( 地域 subtag 向けに United 暫定日本語案: Kingdom is GB). 無効 values get treated as no value. Syntactically 暫定日本語案: well-formed isn’t 同じ as 正しい, either: lang="en" is perfectly 有効 暫定日本語案: tag その’s still 誤った on French ページ. Validity is floor, ない guarantee 暫定日本語案: value actually matches コンテンツ (more on その in boilerplate-デフォルト 暫定日本語案: trap below).
  • 暫定日本語案: Empty is ない 同じ as absent. explicit lang="" means “unknown language” — deliberate state. genuinely 不足している attribute is 異なる 暫定日本語案: failure mode, と accessibility ツール flag it as absent rather than 暫定日本語案: explicitly-unknown.
  • 暫定日本語案: ** root value is デフォルト, ない lock.** <html lang> sets 何 すべての 暫定日本語案: descendant inherits unless it’s overridden — reset lang locally on any 暫定日本語案: element containing real 言語 change (see “Set it on the element that changes, too” below). Don’t confuse この in-document declaration とともに HTTP 暫定日本語案: Content-Language レスポンス header: その header describes transport metadata 暫定日本語案: について レスポンス, ない parsed document, と it isn’t substitute 向けに 暫定日本語案: lang いつ it comes へ element-level inheritance または accessibility.

lang vs. hreflang: confusion, resolved

暫定日本語案: If あなた landed here から hreflang question, この is section あなた want. これらの 暫定日本語案: two get conflated constantly because それら’re both 言語-related, both live at 暫定日本語案: または near top of document, と both 使用 similar-looking codes. ただし それら do 暫定日本語案: unrelated jobs.

暫定日本語案: cleanest articulation comes straight から Google’s own ドキュメント on 暫定日本語案: localized versions of あなた ページ, 暫定日本語案: which groups two together precisely へ say it 使用 neither 向けに detection:

暫定日本語案: “Google doesn’t use hreflang or the HTML lang attribute to detect the language of a page; instead, we use algorithms to determine the language.”

暫定日本語案: Read その carefully. Google names both lang と hreflang in one breath — as two 暫定日本語案: separate things it does ない 使用 へ figure out 何 言語 ページ is in. It 暫定日本語案: detects 言語 から rendered, visible コンテンツ instead.

暫定日本語案: So 何’s actual difference?

  • 暫定日本語案: lang is self-説明: one value, on <html> (または any element), 暫定日本語案: saying “this document’s content is in this language.” Read by ブラウザー, screen 暫定日本語案: readers, spell-checkers; 使用 by Bing; ignored by Google 向けに detection.
  • 暫定日本語案: hreflang is cross-ページ map: 設定 of <link rel="alternate"> 暫定日本語案: annotations (または sitemap/header equivalent) listing other URLs その 暫定日本語案: are alternate 言語/地域 versions of この ページ, と which 言語 各 暫定日本語案: targets. It’s routing signal Google does 使用 — へ serve right URL 暫定日本語案: variant in results — ない detection signal.

暫定日本語案: それら できる と 多くの場合 すべき coexist. Mexican-Spanish ページ carries <html lang="es-MX"> describing its own コンテンツ 設定 of hreflang tags pointing へ 暫定日本語案: its en-US, en-GB, と other siblings. full implementation of hreflang — 暫定日本語案: three 方法, reciprocal-linking rule, self-referential rule, と 暫定日本語案: scale of どのように 多くの場合 it breaks — is its own deep dive; この 記事 deliberately 暫定日本語案: doesn’t re-derive it. one thing へ carry 全体で: lang is simple half 暫定日本語案: of この pair (one value, one element, no reciprocity) precisely because it doesn’t 暫定日本語案: carry hreflang’s cross-ページ relationship complexity — which John Mueller once 暫定日本語案: called “one of the most complex aspects of SEO.” Easy へ 設定, though, is ない 暫定日本語案: 同じ as commonly 正しい.

`lang` describes this document for browsers and assistive technology; hreflang maps alternate URLs for search-result routing. 出典: Google Search Central

The root lang attribute gives one page a BCP 47 language self-description used by browsers and screen readers. Hreflang is a reciprocal cross-page map between alternate URLs, such as en-US and es-MX versions. Google detects a page's language from visible content rather than either annotation, but the lang value should remain accurate and consistent with the hreflang entry for the same URL.

© Patrick Stox LLC · CC BY 4.0 ·

Is lang attribute Google ランキング factor

暫定日本語案: Short answer: no, と Google has been unusually blunt について it. definitive 暫定日本語案: statement is John Mueller’s, reported by Barry Schwartz at 検索エンジン Roundtable 暫定日本語案: in 暫定日本語案: Google: 私たち Ignore HTML lang Attribute. 暫定日本語案: Asked どのように 重要 it is へ declare ページ’s 言語 in HTML, Mueller said:

暫定日本語案: “We don’t use that at all. So we use the hreflang links if you have that if you have different language versions. But the language attribute within the HTML markup is something we don’t use at all. We’ve found that this language markup is something that is almost always wrong. So we tend to ignore that.”

暫定日本語案: その “almost always wrong” is key phrase. Google’s 理由 向けに ignoring lang 暫定日本語案: isn’t “it’s unimportant” — it’s その signal is unreliable at web scale. 暫定日本語案: 人々 leave boilerplate lang="en" defaults in place 後に localizing コンテンツ; 暫定日本語案: CMS と framework templates ship デフォルト その 決して gets updated (Vue CLI’s 暫定日本語案: generated boilerplate, 向けに instance, hard-codes lang="en" regardless of 何 暫定日本語案: あなた 構築 とともに it). いつ signal is 誤った その 多くの場合, sane engineering move 暫定日本語案: is へ stop trusting it と detect 言語 から コンテンツ directly — which is 暫定日本語案: exactly 何 Google says it does. その 2016 quote is 古い, ただし 現在の (2026) 暫定日本語案: 検索 Central doc quoted above independently restates 同じ policy, so treat 暫定日本語案: it as long-standing, unretracted guidance rather than stale one-off.

one exception: machine-translated コンテンツ

暫定日本語案: There’s single, narrow place どこ Google’s docs do care について lang-style 暫定日本語案: value. If あなた publish machine-translated コンテンツ, Google’s 暫定日本語案: translated-results guidance 暫定日本語案: asks あなた へ mark それらの blocks とともに special value format — 暫定日本語案: lang="<target>-x-mtfrom-<source>", e.g. lang="es-x-mtfrom-en" 向けに コンテンツ 暫定日本語案: machine-translated から English へ Spanish. その’s exception その proves 暫定日本語案: rule: Google ignores lang 向けに general 言語 detection, ただし この specific 暫定日本語案: labeling convention is one it defined と reads. ( related lever, if あなた want 暫定日本語案: へ opt out of translation features entirely, is notranslate rule — “To opt out of all translation features in Google Search, use the notranslate rule, which can be implemented as a meta tag or an HTTP header,” per 同じ doc.)

Does Bing 使用 lang attribute

暫定日本語案: Yes — と この is どこ lang gets genuinely more consequential than “Google ignores it” story suggests. Bing’s stance is opposite of Google’s, と it’s 暫定日本語案: 下で-covered almost everywhere.

暫定日本語案: In its 2011 Webmaster Blog post 暫定日本語案: どのように へ Tell Bing あなた Webサイト’s 国 と 言語, 暫定日本語案: Bing lays out priority order of “document location” signals it 使用 向けに 暫定日本語案: relevance. order, top へ bottom:

  1. 暫定日本語案: content-language meta tag in <head> (<meta http-equiv="content-language" content="en-us">).
  2. 暫定日本語案: <html lang="en-us"> attribute, then <title lang="en-us"> 暫定日本語案: attribute, as fallbacks — “the priority order for these tags is: <meta>, <html>, <title>.”
  3. 暫定日本語案: ccTLD.
  4. 暫定日本語案: Reverse-IP lookup — 使用 だけ いつ higher signals are inconclusive.

暫定日本語案: Bing’s advice is へ pick one と be consistent: “It’s best that you use one option, instead of multiple options here.” So unlike Google, Bing explicitly 使用 暫定日本語案: <html lang> as real (if lower-priority) targeting signal. 向けに サイト とともに 暫定日本語案: meaningful Bing トラフィック, その changes recommended action: 設定 lang 暫定日本語案: correctly, と consider matching content-language meta tag on top.

暫定日本語案: Caveat: この is 2011 post, 現在 delisted から Bing’s 現在の blog archive. 暫定日本語案: I’m citing it via Wayback Machine capture; no newer Bing statement supersedes 暫定日本語案: it その I できる find, so I treat mechanism as still 現在の — ただし its age is 暫定日本語案: worth flagging honestly rather than presenting it as fresh guidance.

暫定日本語案: この また closes loop とともに hreflang side of things: Bing barely 使用 暫定日本語案: hreflang way Google does — content-language plus lang is Bing’s parallel 暫定日本語案: mechanism.

なぜ lang attribute matters anyway: accessibility

暫定日本語案: Even 設定 検索 aside entirely, lang earns its place. It is 必要 暫定日本語案: accessibility attribute — WCAG Success Criterion 3.1.1 (Level ) 必要とする 暫定日本語案: デフォルト human 言語 of 各 ページ へ be programmatically determinable, which in 暫定日本語案: practice means 有効 <html lang>. separate criterion, 3.1.2, covers marking 暫定日本語案: 言語 changes 以内に ページ.

Evidence for this claim WCAG 2.2 success criterion 3.1.1 requires the default human language of a page to be programmatically determinable, and W3C lists lang on the html element as a sufficient HTML technique. Scope: WCAG 2.2 Level A language-of-page requirement for HTML documents. Confidence: high · Verified: W3C: Understanding Language of Page

暫定日本語案: downstream effects are concrete と well-documented (Adrian Roselli’s 暫定日本語案: On 使用 of Lang Attribute 暫定日本語案: catalogs many): screen readers 使用 lang へ pick 正しい pronunciation engine 暫定日本語案: と voice (JAWS’s phonetic engine, VoiceOver’s 自動 voice switching), CSS 暫定日本語案: hyphens: auto depends on it, spellcheck behavior keys off it, quotation-mark 暫定日本語案: rendering と デフォルト CJK font selection follow it, と Braille displays behave 暫定日本語案: differently とともに it. Exactly どのように 各 of これらの plays out varies by screen reader, 暫定日本語案: ブラウザー, と installed voice — Roselli’s own tests 表示 JAWS と VoiceOver don’t 暫定日本語案: behave identically — so treat 正しい lang value as enabling right 暫定日本語案: behavior, ない guaranteeing identical experience 全体で すべての assistive-technology 暫定日本語案: stack.

暫定日本語案: と it’s ない solved 問題. Per 現在の 暫定日本語案: WebAIM Million レポート, “missing document language” sits at 13,5% of home ページ — sixth 大半の 一般的な automated 暫定日本語案: accessibility failure on web. rate is improving (down から 15,8% 暫定日本語案: prior year, と 17,1% と 18,6% 前に その), ただし “a large, shrinking problem” is 暫定日本語案: still 問題. Google’s own tooling reflects framing: Lighthouse’s 暫定日本語案: html-has-langhtml-lang-valid checks live 下で its Accessibility 暫定日本語案: category, ない its SEO category — nice tell その even Google’s developer ツール 暫定日本語案: bucket lang as a11y concern, ない ランキング one. それらの checks are built on 暫定日本語案: Deque’s axe-core rule of 同じ name, 暫定日本語案: which classifies 不足している lang as WCAG 2,0/2,1 Level “Serious” 問題.

ブラウザー behavior: auto-translate prompt

暫定日本語案: There’s one more visible behavior lang governs: ブラウザー’s “Translate this page?” prompt. Chrome (と others) weigh lang alongside actual visible-text 暫定日本語案: analysis いつ deciding whether へ オファー translation. 誤った または 不足している value できる 暫定日本語案: misfire in both directions — falsely offering へ translate ページ その’s already 暫定日本語案: in reader’s 言語, または failing へ オファー it on genuinely foreign one.

暫定日本語案: vivid real-world 例 is Manuel Matuzovic’s 暫定日本語案: lang attribute: ブラウザー telling lies, telling sweet little lies: 暫定日本語案: Austrian broadcaster ORF.at shipped German コンテンツ とともに lang="en", so 暫定日本語案: Chrome’s auto-translate treated German text as English と “translated” it, 暫定日本語案: turning Vienna district name “Liesing” へ English word “lies.” その’s 暫定日本語案: boilerplate-デフォルト trap producing ユーザー-facing bug — exact class of 暫定日本語案: 問題 Mueller’s “almost always wrong” was describing.

どのように へ 設定 it correctly

  • 暫定日本語案: 使用 有効 BCP 47 tag. 言語 subtag alone (en, es, fr) if あなた 暫定日本語案: don’t need regional distinction; 言語-地域 (en-US, en-GB, pt-BR) if 暫定日本語案: あなた do. Pull codes から IANA 言語 Subtag Registry; don’t invent them, 暫定日本語案: と remember GB, ない UK.
  • 暫定日本語案: 設定 it on element その changes, too. 向けに embedded foreign phrase in 暫定日本語案: otherwise single-言語 ページ, reset lang locally: <span lang="fr">c'est 暫定日本語案: la vie</span>. Unset descendants inherit the nearest ancestor’s lang, so 暫定日本語案: root value covers everything あなた don’t override.
  • 暫定日本語案: Kill boilerplate デフォルト. lang="en" あなた template または CMS shipped 暫定日本語案: とともに is だけ 正しい if あなた コンテンツ is actually in English. この is failure 暫定日本語案: Mueller called out と ORF.at bug in miniature — audit 向けに it.
  • 暫定日本語案: 保つ lang と hreflang consistent. If ページ’s lang says es-MX ただし its 暫定日本語案: hreflang annotation 向けに その 同じ URL says en, その’s mismatch. It’s exactly 暫定日本語案: “Hreflang and HTML lang mismatch” 問題 I documented in 暫定日本語案: Ahrefs’ hreflang guide — どこ I put 暫定日本語案: it plainly: “Google doesn’t use the HTML language attribute, but other search engines and browsers do. It’s important to keep these two attributes consistent with one another.” Google ignores lang half of その comparison, ただし 暫定日本語案: mismatch still signals その something is misconfigured — which is なぜ サイト 暫定日本語案: audit ツール flag it.

一般的な myths

  • 暫定日本語案: “Correct lang will improve my Google rankings.” No. Google states it 暫定日本語案: doesn’t 使用 lang 向けに 言語 detection at all. It できる matter 向けに Bing と 暫定日本語案: indirectly 役立つ via accessibility と translation behavior, ただし direct Google 暫定日本語案: ランキング benefit isn’t supported.
  • 暫定日本語案: lang and hreflang are basically the same.” No — lang describes ページ 暫定日本語案: it’s on; hreflang points へ other URLs. ページ できる have 正しい lang と no 暫定日本語案: hreflang, または 正しい hreflang と 誤った lang.
  • 暫定日本語案: “No search engine cares about lang.” Bing explicitly does (as fallback 暫定日本語案: behind content-language). 向けに any サイト とともに real Bing トラフィック, この isn’t 暫定日本語案: “nobody cares” situation.
  • 暫定日本語案: “Leaving the default lang="en" is harmless if my content isn’t English.” 暫定日本語案: It’s close へ word-向けに-word failure Mueller called “almost always wrong,” と 暫定日本語案: it’s 何 triggers 誤った translate prompts と 誤った screen-reader pronunciation.
  • 暫定日本語案: “Correct lang gives a 22% CTR lift” / “AI crawlers process lang-tagged pages 40% faster.” これらの specific figures circulate on handful of SEO marketing 暫定日本語案: blogs とともに no traceable study, methodology, または 主要 ソース. I couldn’t 暫定日本語案: corroborate either against any 公式 statement または 最初-party データ — treat 暫定日本語案: them as kind of confident-sounding, baseless folklore その accretes around 暫定日本語案: low-scrutiny technical topics.
  • 暫定日本語案: “An empty lang="" is the same as not having one.” No — explicit empty 暫定日本語案: value means “unknown language,” distinct state から genuinely absent 暫定日本語案: attribute.

どこ この fits

暫定日本語案: この is attribute-level deep dive of HTML SEO subcluster — sibling 暫定日本語案: へ element-level treatment of <article>, <nav>, と <main> in 暫定日本語案: semantic HTML 記事, と へ broader HTML-SEO hub above them. 向けに full 暫定日本語案: cross-ページ targeting story — three implementation 方法, reciprocal rules, 暫定日本語案: と どのように 多くの場合 clusters break at scale — hreflang deep dive is place へ go; 暫定日本語案: この 記事’s job is just へ 保つ two straight in あなた head.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.