Skip to content
sporesecsporesec

Hebrew web page: set language and direction

How to mark a Hebrew page so phones, screen readers and search engines read it right: the lang and dir attributes, and what CSS should not do.

Checked on 2026-10-29

Two settings, two jobs

The lang attribute says which language the page is in. The dir attribute says which way the text runs. They are independent: a language tag does not set direction, and direction does not tell the language. A Hebrew page needs both on the root element: lang="he" and dir="rtl".

Why markup, not CSS

The W3C says never to set the base direction with CSS, and the HTML Standard strongly encourages the dir attribute instead of CSS, so the page keeps its direction where styles are not applied, for example when a search engine reads it. Put the direction in the markup.

Use logical values

In styles, prefer start and end over left and right, so one design works in both directions.

Mixed and unknown text

For form fields and text inserted at run time, whose direction is not known in advance, dir="auto" lets the browser pick the direction from the text itself.

What we check

We read the language tag, the direction, how much of the visible text is Hebrew, and whether Hebrew and English versions link to each other. If the page builds its content with scripts, we say we could not check; we never say a layout is broken.

Ask your web developer

Is dir="rtl" on the root element of the Hebrew pages? Does a Hebrew page carry lang="he"? Are phone numbers and English brand names displayed in the right order inside Hebrew text?

What we do not say

A page can look right with CSS direction and still lack the markup; a page can have the markup and still have a layout fault. We report only the markup.

Sources

  1. W3C Internationalization, Structural markup and right-to-left text in HTML (read on 2026-10-29)
  2. WHATWG, HTML Standard: the dir attribute (read on 2026-10-29)

Want us to read your own site? Run the free website scan, or book a free call.