seoaudit.com.auCheck a site

Fix 18 of 20A warningUpdated

No language set

The html tag can say what language the page is in, for example en-AU. Browsers, screen readers, translation tools and some search engines use it. It is a small thing, and a small warning.

What we look for

We read the lang attribute on the page’s <html> tag. Present passes, and the row quotes it. Missing is a warning, the lightest one we give.

Why it matters

Honestly, less than most items on this list. Google works out a page’s language from its text and says it does not rely on this attribute. Other readers do. Screen readers use it to choose a voice and pronunciation. Browsers use it to decide whether to offer a translation. Spell checkers in forms, hyphenation and the shape of quotation marks follow it. Bing and other search engines read it. For an Australian site, en-AU also tells tools that your spelling is deliberate.

How to fix it

WordPress. Go to Settings, then General, and set Site Language to English (Australia). WordPress writes lang="en-AU" from it.

Squarespace. Open Settings, then Language & Region, and set the site language.

Wix. Open Settings, then Language & Region, and set the site language. Wix writes the attribute from it.

Shopify. Under Settings, then Languages, set the store’s default language. The theme writes the attribute from it; if yours does not, the theme’s theme.liquid should have <html lang="{{ request.locale.iso_code }}"> near the top.

A custom-built site. Make the opening tag <html lang="en-AU">, or the code for whatever language the page is written in.

Check it worked

Run the check again. The passed row quotes the language it found.

Read it

Other tools call this

  • Lighthouse and PageSpeed Insights: <html> element does not have a [lang] attribute, <html> element does not have a valid value for its [lang] attribute
  • Semrush: Missing hreflang and lang attributes
  • WAVE and axe: Language missing or invalid, <html> element must have a lang attribute

Every finding, and what each tool calls it

All guides, fixes and checklists