Language: Right Aligning Scripts in Ion

Getting bidirectional text to display correctly in HTML can sometimes be a challenge. 

In order for right-to-left text to look correct when an HTML page is displayed, the directional context of that text needs to be established. In HTML the direction is set by using the “dir” attribute to the nearest parent element.

Adding dir=”rtl” to any HTML element (i.e. <span dir=”rtl”>Text Here</span> will cause the element to start on the right and flow from right to left.

Read W3C’s tutorial for more information on this subject.


If you have any questions, please contact us on [email protected].

Share this:

Charmaine Yu is a UX/UI designer at Rock Content. With over a decade of experience in visual arts, Charmaine combines her eye for design with her love of UX to create memorable interactive content at Rock. With a UX design diploma from Brainstation, she spent the last couple of years learning and creating new content in the world of UX. Outside of work, you can find her cuddling her dog, at the next music festival or coach-potating at home.