Widely availableSupported across all major browsers. Safe to use in production.

Overview

The <bdi> element isolates text that may have a different text direction from its surrounding text. This prevents the browser's bidirectional text algorithm from affecting or being affected by the direction of the surrounding text.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
16
79
10
6
18
6
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

HTML
<ul>
  <li>Username: <bdi>إيان</bdi> — Score: 90</li>
  <li>Username: <bdi>John</bdi> — Score: 85</li>
</ul>

Live demo

multi-languageyu-za-name

Bdi element in RTLword language. yu-za-name textdirection from separated.

PreviewFullscreen

Bdi with / none. comparison

Bdi(autodirectionseparated) and normaltext. behavior. Difference confirm.

PreviewFullscreen

usage with Overview.

yu-za-generatecontent safeall to display. bdi Usage.

PreviewFullscreen

Use cases

  • Using <bdi>

    The <bdi> element isolates text that may have a different text direction from its surrounding text. This prevents the browser's bidirectional text algorithm from affecting or being affected by the direction of the surrounding text.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Verify how this element is announced by screen readers.

Powered by web-features