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
- W3C Internationalization, Structural markup and right-to-left text in HTML (read on 2026-10-29)
- 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.
We build it. We look after it.
Free, 30 minutes, no sales deck. We ask about the problem, the goal, and what has been tried. If we fit, you get a fixed-price proposal.
- Free intro call30 minutes, free. No pitch.
- AI and automation call30 minutes, free. AI agents, WhatsApp, CRM and workflows.
- Website and online store call30 minutes, free. WordPress, WooCommerce, Shopify or a custom build.
- IT and security call30 minutes, free. Computers, accounts, email, backups and security.