The bdi and bdo Elements
Isolate and override text directionality with bdi and bdo.
Why Bidi Control Elements?
The Unicode Bidirectional Algorithm normally handles mixed-direction text well, but sometimes you need to override it — to isolate a user-supplied name from changing the direction of surrounding text, or to force a specific direction in a code block.
The bdi Element
<bdi> (bidirectional isolation) treats its contents as a separate bidi context. The direction of text inside <bdi> cannot affect the direction of text outside it, and vice versa.
<p>User <bdi>{username}</bdi> posted at 12:34</p>