CSS unicode-bidi Property

You are Here:

CSS unicode-bidi Property

CSS unicode-bidi property is used together with the direction property, determines how bidirectional text in a document is handled.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> p{ direction: rtl; unicode-bidi: bidi-override; } </style> </head> <body> <h1>CSS unicode-bidi Property</h1> <p>This is a paragraph with bidi-override.</p> </body> </html>

Syntax

Using CSS

element{ unicode-bidi: bidi-override; }

Using Javascript

object.style.unicodeBidi="bidi-override";

Animatable

No, unicode-bidi property is not animatable. CSS Animatable Properties Reference.

Default Value

Default value for CSS unicode-bidi property is normal.

Property Value

The following table provides a list of values for CSS unicode-bidi property.

ValueExplanation
normalThe element does not offer an additional level of embedding with respect to the bidirectional algorithm.
embedIf the element is inline, this value opens an additional level of embedding with respect to the bidirectional algorithm.
bidi-overrideFor inline elements this creates an override. For block container elements this creates an override for inline-level descendants not within another block container element.
isolateThe element is isolated from its siblings.
isolate-overrideThe element is isolated from its siblings and the override behavior of the bidi-override keyword to the inner content.
plaintextThe elements directionality calculated without considering its parent bidirectional state or the value of the direction property.

All in One

In the following example, we will demonstrate all values of CSS unicode-bidi property.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> p{ direction: rtl; } p:nth-of-type(1){ unicode-bidi: normal; } </style> </head> <body> <h1>CSS unicode-bidi Property</h1> <h2>unicode-bidi: normal</h2> <p>This is a paragraph with normal.</p> </body> </html>

Using JavaScript

In the following example, we will demonstrate how to change the CSS unicode-bidi property of an element using JavaScript.

Example

HTML Online Editor
<!DOCTYPE html> <html lang="en-US"> <body> <h1>CSS unicode-bidi Property</h1> <p style="direction: rtl;">This is a paragraph.</p> <button onclick="myFunction()">Click Me</button> <script> var x = document.getElementsByTagName("p")[0]; function myFunction(){ x.style.unicodeBidi = "bidi-override"; } </script> </body> </html>

Reminder

Hi Developers, we almost covered 98.7% of CSS Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in CSS.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author