# 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.

- Web page: https://sporesec.com/en/tools/hebrew-rtl-page
- Language: English
- Last updated: 2026-10-29
- Also in עברית: https://sporesec.com/he/tools/hebrew-rtl-page.md

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](https://www.w3.org/International/questions/qa-html-dir) (read on 2026-10-29)
- [WHATWG, HTML Standard: the dir attribute](https://html.spec.whatwg.org/multipage/dom.html#the-dir-attribute) (read on 2026-10-29)

## Next step

- Run the free website scan: https://sporesec.com/en/tools

---

- Contact: contact@sporesec.com | WhatsApp https://wa.me/972532322318 | https://sporesec.com/en/contact.md
- Book a free intro call: https://sporesec.com/en/book.md
- Machine-readable site data: https://sporesec.com/llms.txt | https://sporesec.com/agents/en/index.json
