- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Selectors
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Border Block
- CSS - Border Inline
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursor
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS - Inline Block
- CSS - Dropdowns
- CSS - Visibility
- CSS - Overflow
- CSS - Clearfix
- CSS - Float
- CSS - Arrows
- CSS - Resize
- CSS - Quotes
- CSS - Order
- CSS - Position
- CSS - Hyphens
- CSS - Hover
- CSS - Display
- CSS - Focus
- CSS - Zoom
- CSS - Translate
- CSS - Height
- CSS - Hyphenate Character
- CSS - Width
- CSS - Opacity
- CSS - Z-Index
- CSS - Bottom
- CSS - Navbar
- CSS - Overlay
- CSS - Forms
- CSS - Align
- CSS - Icons
- CSS - Image Gallery
- CSS - Comments
- CSS - Loaders
- CSS - Attr Selectors
- CSS - Combinators
- CSS - Root
- CSS - Box Model
- CSS - Counters
- CSS - Clip
- CSS - Writing Mode
- CSS - Unicode-bidi
- CSS - min-content
- CSS - All
- CSS - Inset
- CSS - Isolation
- CSS - Overscroll
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - Pointer Events
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - Max Block Size
- CSS - Min Block Size
- CSS - Mix Blend Mode
- CSS - Max Inline Size
- CSS - Min Inline Size
- CSS - Offset
- CSS - Accent Color
- CSS - User Select
- CSS Advanced
- CSS - Grid
- CSS - Grid Layout
- CSS - Flexbox
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Paged Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS - Image Sprites
- CSS - Important
- CSS - Data Types
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS - Rounded Corner
- CSS - Border Images
- CSS - Multi Background
- CSS - Color
- CSS - Gradients
- CSS - Box Shadow
- CSS - Box Decoration Break
- CSS - Caret Color
- CSS - Text Shadow
- CSS - Text
- CSS - 2d transform
- CSS - 3d transform
- CSS - Transition
- CSS - Animation
- CSS - Multi columns
- CSS - Box Sizing
- CSS - Tooltips
- CSS - Buttons
- CSS - Pagination
- CSS - Variables
- CSS - Media Queries
- CSS - Functions
- CSS - Math Functions
- CSS - Masking
- CSS - Shapes
- CSS - Style Images
- CSS - Specificity
- CSS - Custom Properties
- CSS Responsive
- CSS RWD - Introduction
- CSS RWD - Viewport
- CSS RWD - Grid View
- CSS RWD - Media Queries
- CSS RWD - Images
- CSS RWD - Videos
- CSS RWD - Frameworks
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
CSS - Unicode-bidi Property
CSS unicode-bidi property is used to control how bidirectional text is displayed in a document. Bidirectional text contains both left-to-right (LTR) and right-to-left (RTL) text.
The unicode-bidi property allows developers to override the default behavior of the browser and ensure that bidirectional text is displayed correctly.
Possible Values
normal − This is the default value, and it specifies that the text should be displayed according to the inherent direction of the text itself. In other words, it will use the direction of the characters in the text to determine how it should be displayed.
embed − This value is used to explicitly set the direction of the text within an element. When you set unicode-bidi to embed, you can also use the direction property to specify whether the text should be displayed left-to-right (ltr) or right-to-left (rtl).
bidi-override − This value creates an override for inline elements. In case of block elements, it overrides the browser's bi-directional text algorithm and flows the text inside any inline children strictly according to the direction property.
isolate − This value isolates the element from its siblings.
isolate-override − This value uses the isolation behavior of the isolate keyword to the surrounding content and the override behavior of the bidi-override keyword to the inner content.
plaintext − Prevents bidirectional text (BIDI) algorithms from affecting the text inside the element.
Applies to
All positioned elements, but some of the values have no effect on non-inline elements.
DOM Syntax
object.style.unicodeBidi = "normal|embed|bidi-override|isolate|isolate-override|plaintext";
CSS properties unicode-bidi and direction are the only properties that are not affected by the all shorthand property.
This property is only used by Document Type Definition (DTD) designers. It is generally not recommended for web designers or similar authors to override it.
CSS unicode-bidi - normal Value
The following example demonstrates using unicode-bidi: normal, the text in its default order from right-to-left direction (RTL) −
<html> <head> <style> .box { direction: rtl; unicode-bidi: normal; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - normal Value</h2> <p>The following text is displayed in its default order from right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - embed Value
The following example demonstrates using unicode-bidi: embed. This value embeds the direction of the text within its surrounding content, and when the direction is set to rtl, the text is displayed in a right-to-left (RTL) direction −
<html> <head> <style> .box { direction: rtl; unicode-bidi: embed; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - embed Value</h2> <p>The following text is displayed in its default order from right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - bidi-override Value
The following example demonstrates using unicode-bidi: bidi-override. This value displays the text in reverse order, with the right most character displayed in the first position.−
<html> <head> <style> .box { direction: rtl; unicode-bidi: bidi-override; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - bidi-override Value</h2> <p>The following text is displayed in reverse order of the characters in right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - isolate Value
The following example demonstrates using unicode-bidi: isolate. This value is used to isolate a bidirectional text from its surrounding text. −
<html> <head> <style> .box { direction: rtl; unicode-bidi: isolate; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - isolate Value</h2> <p>The following text is displayed in its default order from right to left.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - isolate-override Value
The following example demonstrates using unicode-bidi: isolate-override. This value is used to isolate and override the bidirectional text from its surrounding text −
<html> <head> <style> .box { direction: rtl; unicode-bidi: isolate-override; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - isolate-override Value</h2> <p>The following text is displayed in reverse order of the characters in right-to-left direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - plaintext Value
The following example demonstrates using unicode-bidi: plaintext. This value treats the text as plain text without applying any bidirectional text algorithms. −
<html> <head> <style> .box { direction: rtl; unicode-bidi: plaintext; color:red; } </style> </head> <body> <h2>CSS unicode-bidi - plaintext Value</h2> <p>The following text is displayed in its default order from left-to-right direction.</p> <div class="box"> Lorem Ipsum is simply dummy text of the printing and typesetting industry. </div> </body> </html>
CSS unicode-bidi - Related Properties
Following is the list of CSS properties related to unicode-bidi:
property | value |
---|---|
direction | Sets the direction of text in a block-level element. |