Arabic Websites and Right-to-Left Design: What to Get Right
An Arabic page needs more than translated text. W3C guidance on dir, lang and logical layout shows how to build right-to-left pages that work properly.
By EvoltriX TeamUpdated 3 min read

In this guide
An Arabic version of your website should feel natural to Arabic readers: the text flows from right to left, menus and buttons mirror, and numbers and English words sit correctly inside Arabic sentences. That depends on getting the markup right from the start.
Set the Direction and the Language
W3C’s guidance says that if a page is mainly right-to-left, set dir="rtl" on the html element. Blocks, tables and form fields then inherit that direction, and paragraphs align to the right. It also says to declare the language with the lang attribute, such as lang="ar". Language and direction are separate settings: a language tag does not by itself change how text is displayed, so direction must be set explicitly.
Key point
W3C advises setting base direction in HTML rather than only in CSS, because direction can affect meaning and should still work when a stylesheet is missing.
Use Logical Layout Properties
For layout, W3C recommends logical CSS properties such as start and end and margin-inline-start instead of left and right. Logical properties flip automatically with the direction, which makes the Arabic version much easier to maintain. Ask your developer whether the theme uses them.
Handle Mixed Text Carefully
Arabic pages often contain English brand names, numbers or addresses. W3C notes that dir="auto" lets the browser choose direction from the first strongly directional character, which suits user-supplied content and form fields, but it can guess wrongly. The bdi element isolates inline text of unknown direction so it does not disturb the text around it. Page titles may also need an invisible direction mark if the browser infers the wrong direction.
A Checklist for Your Developer
- A separate address for the Arabic version, with hreflang; see SEO for Arabic and English websites.
dir="rtl"andlang="ar"on the Arabic pages.- A font that supports Arabic well, tested at body and heading sizes.
- Mirrored menus, arrows, sliders and breadcrumbs.
- Forms that accept Arabic input and display it correctly.
- Real Arabic content, not only a translated menu.
Test With Native Readers
Automated checks cannot tell you whether the page reads naturally. Ask a native Arabic reader to use the site on a phone and tell you what feels wrong. Accessibility checks still apply; see website accessibility basics.
Planning a Bilingual Site
A second language adds design, content and maintenance work, so plan it from the start rather than as a late add-on. See our web design and development service to discuss yours.
Sources
Last checked: 3 November 2026. Google and the ad platforms change how they work from time to time, so we review our guides regularly.


