unicode-bidi

The unicode-bidi CSS property together with the direction property relates to the handling of bidirectional text in a document. For example, if a block of text contains both left-to-right and right-to-left text then the user-agent uses a complex Unicode algorithm to decide how to display the text. This property overrides this algorithm and allows the developer to control the text embedding.

Values

unicode-bidi: normal
unicode-bidi: embed
unicode-bidi: isolate
unicode-bidi: bidi-override
unicode-bidi: isolate-override
unicode-bidi: plaintext
unicode-bidi: inherit

<!DOCTYPE html>
<html>
    <head>
        <script>
            function displayResult(){
                document.getElementById("p1").style.unicodeBidi = "bidi-override";
            }
        </script>
    </head>
    <body>
        <p>
            This is some text.
        </p>
        <p id="p1" style="direction:rtl">
            This is another text.
        </p>
        <br>
        <button type="button" onclick="displayResult()">
            Override text
        </button>
    </body>
</html>