Web design and digital-business ideas grounded in real tasks.

A Web Page Needs a Language Setting That Matches Its Words

A web editor working with code on a laptop.
AI-generated photographic illustration; not documentary photography.

A page is written in Indonesian, but its template still declares English. The visible words may look correct while the underlying language setting gives assistive technology the wrong starting information.

The W3C’s HTML language technique explains identifying the page’s primary language with the language attribute. The value should reflect the actual text, using a valid language tag.

The public HTML is the check

Inspect the HTML element of the public page. A simple English page may use lang="en", while an Indonesian page may use lang="id". Choose the appropriate tag for the content rather than copying the example mechanically.

In a content-management system, identify which setting or template generates that attribute. Changing a display label in the dashboard may not change the public page. Conversely, an administrator can prefer an English interface while publishing content in another language.

When a page changes language

A translated version needs its own correct page language. If a substantial passage switches language within a page, consider the relevant language markup for that passage. The W3C’s language-declaration guidance provides examples and explains how declarations apply through the document.

Do not treat the attribute as a translation tool. Marking an English paragraph as German does not translate it, and a language selector still needs to lead to a real, usable version of the content.

After a change, check representative articles, archives and static pages. Templates can differ, so one correct homepage does not prove that every page uses the same setting. Include a translated page in the check where the site has one.

Record the intended content language in the publishing checklist. That gives editors a concrete check when a site changes audience or gains another language, and helps keep the visible text and its underlying description aligned.