Skip to content

RTL checker

Does your page declare that it is Arabic and reads right to left?

  • Checks your page
  • Reads:HTML
  • 2 rules
  • Last updated

Reads: HTML

Free, no sign-up.

What we keep

We keep the address exactly as you send it, including anything after a “?”, and its report shows it. Anyone who has the report’s link can open it, so leave out tokens, keys and personal data.

The result appears here

Enter your page’s address and press “Check the page”. This is what the tool runs on it:

  • Arabic page without dir="rtl" on the html elementnot started
  • Missing or wrong lang attribute on an Arabic pagenot started

What it checks

  • The <html> element has dir="rtl" when most of the page's text is Arabic: not ltr or auto, and not on <body> alone.
  • The lang attribute on <html> names a language written in Arabic script, such as ar or ar-SA, not en or an empty value.

Example

WrongHTML
<!doctype html>
<html lang="en">
<body>
  <p>مرحباً بكم في متجرنا</p>
</body>
</html>
RightHTML
<!doctype html>
<html lang="ar" dir="rtl">
<body>
  <p>مرحباً بكم في متجرنا</p>
</body>
</html>

How to fix

Put the language and the direction together on the <html> element:

  • In WordPress, choose Arabic under "Settings → General → Site Language"; themes that call language_attributes() then add both attributes themselves.
  • If part of the page needs the other direction, such as a code sample or an English paragraph, put dir="ltr" on that element only.
  • Add a country code when the content is meant for one country, such as ar-SA, ar-AE or ar-OM.
HTML
<html lang="ar" dir="rtl">

FAQ

No. Direction is part of the meaning of the text, so it belongs in the HTML, as W3C and the HTML specification recommend. Styles may not load or may be ignored, as in a browser's reader mode or when the content is copied elsewhere; the attribute stays with the text.

Elements outside <body> do not inherit it, including <title>, which shows in the browser tab and in bookmarks. Put it on <html> and everything on the page inherits it.

Google says it determines a page's language from its visible content, not from the lang attribute. The attribute still matters: screen readers choose their pronunciation from it, browsers use it for fonts and translation offers, and WCAG 2.2 (success criterion 3.1.1) requires the page's language to be programmatically determined.

How we measure

Last updated Methodology and scoring

We fetch the page as ArablyzerBot, following its redirects, and read the HTML as the server sends it, before any JavaScript runs. We count the letters in the visible text; the tool applies when more than half of them are Arabic-script letters, which includes Persian, Urdu and other languages written in Arabic script. Then we apply two rules: the page's direction and its language. The same page gives the same result on every check.