Directionality demo

Static Hebrew text, without dir attribute

מא' ועד ת': בשלמות, מהתחלה ועד הסוף.

Note that the period is misplaced, at the start (i.e., on the very right) of the text. The text is left aligned, as this is the default; setting dir=rtl also causes right-alignment.

Static Hebrew text, with dir=rtl attribute

מא' ועד ת': בשלמות, מהתחלה ועד הסוף.

JavaScript-generated Hebrew text, without dir property

JavaScript-generated Hebrew text, with dir property set to rtl

JavaScript-generated Hebrew text, with RLE control character

The directionality control characters do not affect text alignment. This is why the example above appears as left-aligned.