concept

internationalization — CSS reference

Internationalized layout adapts to language, script and direction without duplicating component styling. Use semantic lang and dir, logical spacing, wrapping and appropriate fonts. RTL does not imply that all icons or numerical content should be mirrored.

Formal Syntax & Structure

css syntaxcss
<p lang="fa" dir="rtl">…<bdi>ABC-42</bdi></p>

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS logical layout lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#a{padding-inline-start:12px} #b{unicode-bidi:isolate}</style><body><p id="a" lang="fa" dir="rtl">شماره سفارش: <bdi id="b">ABC-42</bdi></p></body></html>
CSS Reference