Trakis

Trakis · Rules

lang attribute missing

Pages without a lang attribute on <html>. The language attribute tells browsers, screen readers and search engines what language the page is in, so it is read aloud, translated and matched to searches correctly.

WarningONPAGE-009 · On-page · checked on every page

Where it usually comes from

Hand-written templates and older themes that start with <html> and nothing else.

How to fix it

  • Declare the language on the <html> element, in the layout every page shares.
layout
<html lang="ro">

Shown for an example shop at www.example.com. In a Trakis report the same fix comes with your own addresses and the list of your pages it applies to.

How to check it yourself

View the page source: the first tag should look like <html lang="en"> or the code of the site's language.

What it looks like in a report

Warning The <html> element has no lang attribute. · whole site

One attribute in the theme’s main template covers every page. (An example shop; the numbers are illustrative.)

How the audit counts it

ONPAGE-009 is a warning in the on-page category, and weighs lightly in that category’s score. When it appears on many pages built from the same template, the report shows it once, with the number of pages it covers — because one change in the template fixes all of them.

If the finding is deliberate on your site, it can be accepted as intentional in the report. It then leaves the list and the score, and comes back on its own if what it shows changes.

Other on-page checks

Find it on your site

A Trakis audit runs this check and the other 65 on your site, and tells you on how many pages each one sits. Or go back to all the rules.