Neova고급 SEO 플랫폼

HTML lang 속성이 없거나 비어 있음

Neova에서는 크롤링 자체에서 실행됩니다. 따로 설정할 것이 없습니다.

규칙 최종 검토: 2026년 10월 17일 · 가이드 업데이트: 2026년 7월 7일

WCAG 3.1.1은 페이지의 언어를 코드에 설정하도록 요구합니다. 설정이 없으면 스크린 리더가 텍스트를 잘못된 발음으로 읽을 수 있습니다.

해 볼 수 있는 조치

html 요소의 lang 속성을 콘텐츠의 언어로 설정하세요(예: lang=en).

Neova가 찾는 방법

Neova는 크롤링하는 모든 페이지의 HTML을 읽고 이 문제를 찾습니다.

Neova가 플래그를 지정하는 이유

  • WCAG 3.1.1(A 수준)은 각 페이지의 기본 언어를 코드에 지정하도록 요구합니다. 그래야 스크린 리더가 맞는 음성과 발음을 고를 수 있습니다.
  • 지정하지 않으면 브라우저가 엉뚱한 번역을 제안하거나 잘못된 하이픈 처리와 글꼴을 적용할 수 있습니다.
  • Google은 페이지 언어를 감지하는 데 lang 속성을 쓰지 않는다고 말하므로, 이는 주로 방문자와 보조 도구를 위한 것입니다.

출처

작성하는 티켓

이 부분은 현재 영어로만 제공됩니다.

HT-017 · HTML Lang Attribute Is Missing or Empty

How to Check the Fix: 1. Run the check again in Neova
2. Spot-check sample URLs across affected templates
3. Record the re-check date and period label next to the baseline

Neova writes this ticket for every affected page group and sends it to Jira, Linear, Asana and the rest, after you approve it.

전체 가이드

이 부분은 현재 영어로만 제공됩니다.

What "HTML Element Must Have a Lang Attribute" Means

This check fires when your opening <html> tag has no lang attribute, so nothing tells browsers, screen readers, or search engines what human language the page is written in. The machines are left guessing, and they guess badly.

The stakes land in two places. Screen readers pick the wrong pronunciation engine and read your English page with a French voice or vice versa, which is a genuine accessibility failure. And on multilingual sites, a missing or wrong lang undercuts your hreflang setup, because the on-page language signal and your hreflang annotations should agree.

The Failing Example and the Fix

Here is the broken markup. The <html> tag is bare:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Neighbourhood Bakery</title>
</head>

The fix is to declare the language on the root element. For an English page:

<html lang="en">

Use a valid BCP 47 code. en for English, fr for French, de for German. If you serve a region-specific variant, add the subtag: en-GB, en-US, pt-BR, es-MX. Do not invent codes like lang="english" or lang="en_US" with an underscore. The separator is a hyphen, and the language subtag comes first.

Language Codes You Will Actually Use

Content Correct Value Common Wrong Value
English (generic) lang="en" lang="english"
British English lang="en-GB" lang="en_gb"
US English lang="en-US" lang="us"
French (France) lang="fr" or lang="fr-FR" lang="french"
Brazilian Portuguese lang="pt-BR" lang="br"
Simplified Chinese lang="zh-Hans" lang="chinese"

How to Detect It

  1. View Source. Open the page and look at the very first lines. If the tag reads <html> with nothing after it, the attribute is missing. Thirty seconds for one page.
  2. curl. Grab the raw HTML and check the root tag: curl -s https://example.com/page/ | grep -i '<html'. You will see instantly whether lang= is present and what value it carries.
  3. Screaming Frog. Crawl the site and check the "Language" data in the internal or a custom extraction on html[lang]. Any URL with a blank value is missing the attribute, and you get the full list in one export instead of hunting page by page.
  4. GSC URL Inspection. Inspect the URL, run "Test Live URL," and view the rendered HTML. Confirm the <html> tag Google actually rendered carries the lang value you expect, which matters if JavaScript sets it late.

How to Fix It

  1. Find where the <html> tag is generated. In WordPress it is usually output by the language_attributes() function in header.php, which pulls from your Site Language setting under Settings > General.
  2. Set the correct code. If WordPress is already calling language_attributes() but the tag is bare, fix the Site Language setting rather than hardcoding, so the value stays consistent.
  3. On hand-built templates, write the attribute directly: <html lang="en">.
  4. For multilingual sites, make each language version output its own correct code so the French pages say fr and the German pages say de. A single hardcoded value across all languages is a common and quiet bug.
  5. If you also set xml:lang, make the two agree. A mismatch trips its own check, see lang and xml:lang must match.

Why This Is an Accessibility Issue First

Assistive technology leans on the lang attribute harder than search engines do. A screen reader like NVDA, JAWS, or VoiceOver switches its pronunciation engine based on the declared language. Feed it a French page marked lang="en", or unmarked so it defaults to the system language, and it reads French words with English phonetics, which ranges from awkward to unintelligible. That is a real barrier for users who rely on audio, and it is why the WCAG accessibility guidelines list "language of page" as a requirement, not a nicety.

The SEO angle rides on top of that. Google reads the same attribute as a language hint, and on any site that serves more than one language it expects the on-page lang, the hreflang cluster, and the actual content to tell one consistent story. When they conflict, you risk the wrong language version ranking for a query, which is both an accessibility miss and a traffic miss at once. Getting lang right is a two-for-one: it fixes the audio experience and shores up your international signals. For the ranking side of multilingual setup, see unsupported or misconfigured hreflang.

Frequently Asked Questions

Does the Lang Attribute Affect My Google Rankings?

It is not a direct ranking factor on its own, but Google uses it as one signal for the page's language, and on international sites it needs to line up with your hreflang. Get it wrong and you risk the wrong-language version surfacing for a query, which is a ranking and traffic problem even if the attribute itself is not a "factor."

Can I Mark up Individual Elements in a Different Language?

Yes, and you should. Set the page-level language on <html>, then override on any inline chunk that switches languages, for example <blockquote lang="fr">...</blockquote>. Screen readers switch voices accordingly.

Should I Use en or en-US?

Use the plain subtag like en unless a regional variant genuinely matters for spelling or pronunciation. If your content is deliberately British or American, en-GB or en-US adds useful precision. When in doubt, the two-letter code is a safe default.

How Does This Connect to Hreflang?

Your lang attribute and your hreflang annotations are two signals about the same thing and they should never contradict each other. If a page says lang="en" but hreflang labels it fr, you are sending mixed signals. See the hreflang and international SEO FAQ to keep them aligned.

My CMS Outputs the Tag but the Value Is Empty. What Now?

That means the template is calling the language function but the CMS language setting is blank or misconfigured. Fix the setting (in WordPress, Settings > General > Site Language) rather than patching the template, so it stays correct through theme updates.

내 사이트에서 찾아보기

Neova는 크롤링할 때마다 이 점검과 다른 모든 점검을 실행하고, 수정 방법을 팀을 위한 티켓으로 작성합니다.

  • Mac, Windows, Linux용 데스크톱 앱
  • 출처가 함께 있는 696개 점검 전체
  • Search Console과 Analytics 4를 읽기 전용으로 연결
  • Jira, Linear, Asana로 티켓 보내기

Neova 다운로드 Desktop Free 플랜 또는 Solo 14일 무료, 카드 불필요.

글로벌 SEO 점검 전체 · 가이드 · 점검 라이브러리

작성: Neova Labs · 점검 라이브러리로 돌아가기