HTML lang Attribute
暫定日本語訳:何 HTML lang attribute does, なぜ Google ignores it 向けに 言語 detection ただし Bing 使用 it, どのように it differs から hreflang, と なぜ it still matters 向けに accessibility と ブラウザー auto-translate prompt.
言語
このページには証拠シグナルが1件あります
- 関連するライブツールOn-Page SEO Checker
暫定日本語訳: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 — HTML
langattribute —lang="en"on あなた ページ’s opening 暫定日本語案:<html>tag — tells ブラウザー と screen readers 何 言語 あなた ページ’s 暫定日本語案: コンテンツ is written in. It’s easy へ mix up とともに hreflang, ただし それら’re 異なる: 暫定日本語案:langdescribes この ページ; hreflang points へ あなた other 言語 versions. 暫定日本語案: Google doesn’t 使用langへ detect ページ’s 言語, while attribute still matters 向けに 暫定日本語案: accessibility と 向けに whether あなた ブラウザー オファー へ translate ページ.
何 lang attribute is
暫定日本語案: Near very top of 大半の Webページ is tag その looks like この:
<html lang="en">暫定日本語案: その lang="en" is HTML lang attribute. Its one job is へ declare
暫定日本語案: 言語 ページ’s コンテンツ is written in — en 向けに English, es 向けに Spanish,
暫定日本語案: de 向けに German. あなた できる get more specific とともに 地域: en-US 向けに American
暫定日本語案: English, en-GB 向けに British English, pt-BR 向けに Brazilian Portuguese.
暫定日本語案: It’s small thing, ただし few 異なる systems read it:
- 暫定日本語案: Screen readers 使用 it へ pronounce あなた words correctly — English voice 暫定日本語案: reading French text sounds like nonsense. 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
- 暫定日本語案: ブラウザー 使用 it (along とともに actual text) へ decide whether へ pop up “Translate this page?”
- 暫定日本語案: Google mostly ignores it (more on なぜ in Advanced tab).
lang is ない hreflang
暫定日本語案: この is confusion その 送信 大半の 人々 へ ページ like この one. Here’s 暫定日本語案: one-line difference:
- 暫定日本語案:
lang= “the content on this page is in this language.” One value, 設定 暫定日本語案: on あなた<html>tag. - 暫定日本語案: hreflang = “here are the other URLs that are the German, Spanish, and French versions of this page.” 設定 of links pointing へ other ページ.
暫定日本語案: lang is self-説明. Hreflang is map へ あなた alternate ページ. simple
暫定日本語案: single-言語 サイト needs 正しい lang と no hreflang at all. If あなた run
暫定日本語案: multilingual サイト, あなた’ll have both — と それら すべき agree とともに 各 other.
何 value すべき あなた 使用
暫定日本語案: 使用 real 言語 code, ない something あなた made up:
- 暫定日本語案: Just 言語 if あなた don’t care について regional variants:
en,es,fr. - 暫定日本語案: 言語 plus 地域 if あなた do:
en-US,en-GB,pt-BR.
暫定日本語案: Don’t invent codes like eng または en-UK ( 正しい code 向けに UK is GB,
暫定日本語案: ない UK). と don’t leave デフォルト lang="en" sitting on ページ whose コンテンツ
暫定日本語案: isn’t actually in English — その’s single 大半の 一般的な mistake, と it causes
暫定日本語案: real 問題 とともに translation prompts と screen readers.
暫定日本語案: Want deeper version — exactly なぜ Google ignores it, どのように Bing 使用 it, 暫定日本語案: accessibility rules, と ブラウザー auto-translate story? Switch へ 暫定日本語案: Advanced tab.
暫定日本語案: TL;DR —
langdeclares natural 言語 of この document (<html lang="en">, or a region variant likeen-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, と HTMLlangattribute 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 isGB). 無効 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 — resetlanglocally 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?
- 暫定日本語案:
langis 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 正しい.
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:
- 暫定日本語案:
content-languagemeta tag in<head>(<meta http-equiv="content-language" content="en-us">). - 暫定日本語案:
<html lang="en-us">attribute, then<title lang="en-us">暫定日本語案: attribute, as fallbacks — “the priority order for these tags is:<meta>,<html>,<title>.” - 暫定日本語案: ccTLD.
- 暫定日本語案: 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 以内に ページ.
暫定日本語案: 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-lang と html-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, 暫定日本語案: と rememberGB, ないUK. - 暫定日本語案: 設定 it on element その changes, too. 向けに embedded foreign phrase in
暫定日本語案: otherwise single-言語 ページ, reset
langlocally:<span lang="fr">c'est 暫定日本語案: la vie</span>. Unset descendants inherit the nearest ancestor’slang, 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
langsayses-MXただし its 暫定日本語案: hreflang annotation 向けに その 同じ URL saysen, その’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 ignoreslanghalf of その comparison, ただし 暫定日本語案: mismatch still signals その something is misconfigured — which is なぜ サイト 暫定日本語案: audit ツール flag it.
一般的な myths
- 暫定日本語案: “Correct
langwill 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. - 暫定日本語案: “
langand hreflang are basically the same.” No —langdescribes ページ 暫定日本語案: it’s on; hreflang points へ other URLs. ページ できる have 正しいlangと no 暫定日本語案: hreflang, または 正しい hreflang と 誤ったlang. - 暫定日本語案: “No search engine cares about
lang.” Bing explicitly does (as fallback 暫定日本語案: behindcontent-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
langgives 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.
AI要約
暫定日本語案: condensed take on Advanced version:
- 暫定日本語案:
langdeclares 言語 of この document (<html lang="en">, または 暫定日本語案: 地域 variant likeen-US) using BCP 47 tag. It’s self-説明, ない 暫定日本語案: targeting または routing mechanism. - 暫定日本語案: It is ない hreflang. Google’s own docs group both together as things it does
暫定日本語案: ない 使用 向けに 言語 detection: “Google doesn’t use hreflang or the HTML
lang attribute to detect the language of a page… we use algorithms.”
lang暫定日本語案: describes ページ it’s on; hreflang points へ alternate-言語 URLs. - 暫定日本語案: Google ignores
lang向けに detection — Mueller: “we don’t use that at all… almost always wrong,” because boilerplate/CMS defaults 作る it unreliable at 暫定日本語案: scale. One carve-out: labeling machine-translated blocks とともに 暫定日本語案:lang="es-x-mtfrom-en". - 暫定日本語案: Bing does opposite: its 2011 Webmaster Blog names
<html lang>as 暫定日本語案: fallback document-ロケーション signal, behindcontent-languagemeta tag (order: 暫定日本語案: meta > html > タイトル). 向けに Bing トラフィック, 設定langcorrectly. - 暫定日本語案: Accessibility is real stakes: WCAG 3.1.1 必要とする it; it drives
暫定日本語案: screen-reader pronunciation,
hyphens: auto, spellcheck, と CJK fonts. 暫定日本語案: “Missing document language” is still ~13,5% of home ページ — top-six WebAIM 暫定日本語案: Million failure, though shrinking. - 暫定日本語案: ブラウザー 使用 it 向けに auto-translate prompt — 誤った value misfires (
暫定日本語案: ORF.at
lang="en"-on-German bug その “translated” district name へ “lies”). - 暫定日本語案: Get it right: 有効 BCP 47 tag (
GB, ないUK), resetlangon embedded 暫定日本語案: foreign phrases, kill boilerplatelang="en"on non-English ページ, と 保つ 暫定日本語案:langconsistent とともに hreflang ( “Hreflang and HTML lang mismatch” audit 暫定日本語案: 問題).
公式ドキュメント
暫定日本語案: 主要-ソース ドキュメント と standards references.
暫定日本語案: Google
- 暫定日本語案: Localized Versions of あなた ページ — “Google doesn’t use hreflang or the HTML lang attribute to detect the language of a page” line.
- 暫定日本語案: Translated Google 検索結果 —
lang="x-mtfrom-"machine-translation labeling convention とnotranslateopt-out. - 暫定日本語案: Managing Multi-Regional と Multilingual サイト — adjacent context on 言語/地域 signals.
暫定日本語案: Bing / Microsoft
- 暫定日本語案: どのように へ Tell Bing あなた Webサイト’s 国 と 言語 (Bing Webmaster Blog, 2011) —
meta > html > titledocument-ロケーション priority order. Original URL is delisted; text confirmed via Wayback Machine capture.
暫定日本語案: Standards / technical references
- 暫定日本語案: MDN —
langglobal attribute — BCP 47 requirement, empty-string vs. absent behavior, inheritance, WCAG references. - 暫定日本語案: W3C Internationalization — Declaring 言語 in HTML — BCP 47 / IANA registry guidance と nested-element rules 向けに mixed-言語 コンテンツ.
- 暫定日本語案: Deque University — axe rule
html-has-lang— WCAG 2,0/2,1 Level classification behind Lighthouse’s accessibility audit. - 暫定日本語案: WebAIM Million — annual accessibility survey とともに “missing document language” failure rate.
出典からの引用
暫定日本語案: On—record statements. 各 link deep-links へ quoted passage どこ 暫定日本語案: ソース ページ supports it.
暫定日本語案: Google — it doesn’t 使用 lang 向けに 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.” 暫定日本語案: — Google 検索 Central docs. 暫定日本語案: Jump へ quote
暫定日本語案: Google — machine-translation carve-out と notranslate
- 暫定日本語案: “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.” 暫定日本語案: — Translated Google 検索結果. 暫定日本語案: Jump へ quote
暫定日本語案: John Mueller, Google — “almost always wrong”
- 暫定日本語案: “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.” 暫定日本語案: — via 検索エンジン Roundtable’s coverage of 2016 Google Webmaster hangout. 暫定日本語案: Read coverage 暫定日本語案: Relayed via Barry Schwartz’s write-up of 2016 hangout ( original video isn’t independently reachable). underlying “we don’t use lang for detection” policy is independently reconfirmed by 現在の 検索 Central doc quoted above, so I treat position as still accurate despite quote’s age.
暫定日本語案: Bing / Microsoft — lang is fallback targeting signal
- 暫定日本語案: Priority order 向けに document-ロケーション signals: “the priority order for these tags is:
<meta>,<html>,<title>,” とともに recommendation へ “use one option, instead of multiple options here.” 暫定日本語案: — Bing Webmaster Blog, “How To Tell Bing Your Website’s Country and Language,” 2011. 暫定日本語案: Quoted から 2011 post via its Wayback Machine capture — original URL is delisted から Bing’s 現在の blog archive, と no newer Bing statement supersedes mechanism その I できる find. Its age (2011) is real caveat; I’m citing it as long-standing ただし 古い.
暫定日本語案: Me — 保持 lang と hreflang consistent
- 暫定日本語案: “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.” 暫定日本語案: — から Ahrefs’ hreflang guide, on “Hreflang and HTML lang mismatch” audit 問題. 暫定日本語案: Read it
暫定日本語案: The line attributed へ me is から Ahrefs’ hreflang guide (which I’m credited 暫定日本語案: on), reproduced as my own words. Google’s と Bing’s lines are quoted から their 暫定日本語案: respective ソース per links above; Bing quote is から 2011 post captured 暫定日本語案: via Wayback Machine.
Which 言語 tag do I actually need
暫定日本語案: quick walk-通じて いつ あなた’re staring at ページ と ない sure 何 へ 設定.
暫定日本語案: 1. Do あなた just need へ declare 何 言語 この ページ is in?
暫定日本語案: その’s lang attribute. 設定 <html lang="…">. Go へ 手順 2.
暫定日本語案: 2. Do あなた need へ distinguish regional variants (US vs. UK English, Brazilian 暫定日本語案: vs. European Portuguese)?
- 暫定日本語案: No → 使用 言語 subtag alone:
<html lang="en">,lang="es", 暫定日本語案:lang="pt">. - 暫定日本語案: Yes → 使用 言語-地域:
<html lang="en-US">,lang="en-GB">, 暫定日本語案:lang="pt-BR">. (地域 isGB, ないUK.)
暫定日本語案: 3. Does ページ contain passages in 異なる 言語 ( French quote in 暫定日本語案: English 記事)?
- 暫定日本語案: Yes → wrap them と reset locally:
<span lang="fr">c'est la vie</span>. 暫定日本語案: Everything else inherits root<html lang>. - 暫定日本語案: No → root value covers whole ページ.
暫定日本語案: 4. Do あなた また have 同じ ページ in other 言語 at other URLs?
- 暫定日本語案: Yes → あなた additionally need hreflang — separate mechanism pointing へ
暫定日本語案: それらの alternate URLs. 保つ 各 ページ’s
langconsistent とともに its hreflang entry. 暫定日本語案: (See hreflang deep dive; その’s its own 構築.) - 暫定日本語案: No → あなた’re done とともに
langalone.
暫定日本語案: 5. Is コンテンツ machine-translated?
- 暫定日本語案: Yes → per Google, label translated block:
暫定日本語案:
lang="<target>-x-mtfrom-<source>"(e.g.lang="es-x-mtfrom-en"). - 暫定日本語案: No → plain BCP 47 tag is all あなた need.
暫定日本語案: 6. Does Bing トラフィック matter へ あなた?
- 暫定日本語案: Yes → 設定
langcorrectly と consider matchingcontent-languagemeta 暫定日本語案: tag — Bing weights meta above<html lang>. Pick one consistent value; don’t 設定 暫定日本語案: conflicting ones. - 暫定日本語案: No →
langon<html>plus accessibility correctness is enough.
lang attribute cheat sheet
暫定日本語案: lang vs. hreflang — one-line difference
lang | hreflang | |
|---|---|---|
| Declares | 言語 of この ページ’s コンテンツ | other URLs その are alternate-言語 versions |
| Shape | One value on <html> (または any element) | 設定 of <link rel="alternate"> annotations (または sitemap/header) |
| Google 使用 it? | No (ignored 向けに detection) | Yes — へ route right URL variant |
| Bing 使用 it? | Yes — fallback targeting signal | Barely |
| Accessibility / translate prompt? | Yes | No |
暫定日本語案: Who reads <html lang>
| Consumer | 何 it does とともに it |
|---|---|
| Ignores it 向けに 言語 detection (アルゴリズム instead) | |
| Bing | Fallback targeting signal, behind content-language meta |
| Screen readers | Pronunciation / voice selection (WCAG 3.1.1) |
| ブラウザー | One input へ auto-translate prompt |
| CSS / spellcheck | hyphens: auto, spellcheck, quotation marks, CJK fonts |
暫定日本語案: 有効 values
- 暫定日本語案: 言語 だけ:
en,es,fr,de - 暫定日本語案: 言語-地域:
en-US,en-GB,pt-BR,zh-Hans - 暫定日本語案: 無効:
eng(three-letter),en-UK(使用GB), full 言語 names - 暫定日本語案:
lang=""= “unknown” ( real state, 異なる から absent) - 暫定日本語案: Machine-translated block:
lang="es-x-mtfrom-en"
暫定日本語案: Fast facts
- 暫定日本語案: Mueller:
langis “almost always wrong” — Google ignores it 向けに detection. - 暫定日本語案: Bing priority order: meta
content-language><html lang>><title lang>. - 暫定日本語案: “Missing document language” ≈ 13,5% of home ページ (WebAIM Million, top-six 暫定日本語案: failure, trending down).
- 暫定日本語案: Lighthouse’s
html-has-langlives 下で Accessibility, ない SEO. - 暫定日本語案: 保つ
langconsistent とともに hreflang — “Hreflang and HTML lang mismatch” 暫定日本語案: audit 問題.
HTML lang mistakes
- 暫定日本語案: Leaving
lang="en"in すべての localized template. 設定 言語 から actual document locale と テスト non-English routes. - 暫定日本語案: Using
langinstead of hreflang.langdescribes この document; hreflang connects alternate URLs. Implement 各 向けに its own job. - 暫定日本語案: Adding 国 code その does ない match コンテンツ. 使用 有効 BCP 47 tag と 追加 地域 だけ いつ 言語 variant is genuinely regional.
- 暫定日本語案: Putting attribute on wrapper instead of root
<html>. Declare ページ’s 主要 言語 on document element; 使用 ローカルlangattributes 向けに passages in another 言語. - 暫定日本語案: Assuming Google needs
langへ detect 言語. 保つ it 向けに accessibility, ブラウザー, Bing, と standards—ない as Google ランキング lever.
screen reader 使用 誤った pronunciation
暫定日本語案: Likely cause: 不足している, 無効, または incorrect root 言語; foreign-言語 passages 可能性がある また be unmarked. Fix: 設定 正しい BCP 47 value on <html> と ローカル overrides どこ 言語 changes. Confirm: inspect accessibility tree と テスト とともに relevant screen reader voice.
すべての localized ページ says lang="en"
暫定日本語案: Likely cause: hard-coded base template または locale mapping その 決して reaches document shell. Fix: derive root value から route/コンテンツ locale on サーバー または at 構築 time. Confirm: クロール representative locale URLs と compare declared 言語 とともに visible コンテンツ.
lang と hreflang disagree
暫定日本語案: Likely cause: separate locale maps, 無効 地域 codes, または template fallback. Fix: 使用 one normalized locale configuration while preserving 異なる purposes of two signals. Confirm: 各 ページ declares its own コンテンツ 言語 と its alternate links point へ 正しい reciprocal variants.
ブラウザー translation prompts are 誤った
暫定日本語案: Likely cause: declared 言語 conflicts とともに dominant visible コンテンツ または mixed-言語 blocks are ない scoped. Fix: 正しい root declaration と mark substantial passages とともに their own lang. Confirm: ブラウザー と accessibility checks identify intended 主要 言語.
ツール 向けに 言語 declarations
- 暫定日本語案: On-ページ SEO Checker surfaces raw document 言語 alongside other HTML signals.
- 暫定日本語案: hreflang Generator + Linter checks alternate-言語 codes と relationships; 使用 it alongside, ない instead of, root
langaudit. - 暫定日本語案: ブラウザー DevTools 表示 root
<html lang>value と accessibility tree 使用 by assistive technology. - 暫定日本語案: crawler とともに XPath extraction できる compare declaration 全体で locale templates:
string(/html/@lang).
時間を使う価値のあるリソース
暫定日本語案: My related writing
- 暫定日本語案: Hreflang: Easy Guide 向けに Beginners — hreflang deep dive I’m credited on, including “Hreflang and HTML lang mismatch” audit 問題 その ties
langと hreflang together. - 暫定日本語案: Beginner’s Guide へ Technical SEO — どこ markup と international signals fit in bigger picture.
暫定日本語案: My speaking
- 暫定日本語案: どのように 検索 機能 (SlideShare) — my walkthrough of クロール, rendering, インデックス登録, と ランキング, including どのように Google reads (と normalizes) あなた markup. (My standing disclaimer applies: “This is my understanding of systems… not going to be 100% complete or accurate.”)
暫定日本語案: 公式
- 暫定日本語案: Google — Localized Versions of あなた ページ と Translated Google 検索結果.
- 暫定日本語案: Bing — どのように へ Tell Bing あなた Webサイト’s 国 と 言語 (2011, via Wayback Machine).
暫定日本語案: から around industry
- 暫定日本語案: MDN —
langglobal attribute — definitive technical reference: BCP 47, empty-vs-absent, inheritance. - 暫定日本語案: W3C — Declaring 言語 in HTML — standards-body どのように-へ, including mixed-言語 ページ.
- 暫定日本語案: Deque — axe rule
html-has-lang— accessibility rule behind Lighthouse’s audit. - 暫定日本語案: WebAIM Million — annual survey とともに 現在の “missing document language” failure rate.
- 暫定日本語案: Adrian Roselli — On 使用 of Lang Attribute — deep accessibility catalog of 何
langactually affects. - 暫定日本語案: Manuel Matuzovic — lang attribute: ブラウザー telling lies — ORF.at
lang="en"-on-German auto-translate ケース study. - 暫定日本語案: Google: 私たち Ignore HTML lang Attribute (検索エンジン Roundtable) — full Mueller “almost always wrong” quote.
- 暫定日本語案: r/TechSEO — community 向けに markup, international, と audit debugging.
テスト yourself: HTML lang Attribute
暫定日本語案: Five quick questions on 何 lang does と どのように it differs から hreflang. Pick
暫定日本語案: answer 向けに 各, then 確認.
変更履歴
2026年7月18日に更新。
編集概要と記録された変更の詳細。変更の詳細
-
変更の詳細な注記は現在英語でのみ提供されています。
-
変更の詳細な注記は現在英語でのみ提供されています。
-
変更の詳細な注記は現在英語でのみ提供されています。
完全な比較は利用できません — この改訂の以前のスナップショットがアーカイブされていません。