Text Content

HTML <bdo> element

Overrides text direction explicitly. Specify dir as ltr or rtl; use this only when an override is intentional. The direction override forces the visual direction of its content. It is different from declaring natural direction on a paragraph. Do not use it to reverse ordinary text or untrusted user names. It accepts global HTML attributes; individual global features may be inapplicable or restricted.

Formal Syntax & Structure

html syntaxhtml
<bdo dir="rtl">Text</bdo>

Parameters & Attributes

NameTypeDescription
dirltr or rtlRequired direction override. Use bdi rather than bdo for unknown user-generated direction.

Return Value

HTMLElement

Content model: Phrasing content, with element-specific restrictions.

Working Example

Example Snippethtml
<!doctype html><html lang="en">  <head>    <meta charset="utf-8">    <title>HTML example</title>  </head>  <body>    <bdo dir="rtl">ABC</bdo>  </body></html>
HTML Reference