The technologies for creating right-to-left RTL text have evolved in the past five years. The easiest option is to create or import Unicode text and post it online. The text will be correctly positioned in most cases.
The Unicode specification includes a directionaly specification for each character depending on its script. Many including Latin A,B,C, etc are encoded as LTR (left to right), but characters from RTL scripts such as Arabic, Hebrew and others are encoded as being RTL.
That means if you activate a Unicode compliant keyboard, then the direction will be automatically changed for characters in an RTL language. The same is true when inserting characters via entity code.
See the following pages for examples and information.
The easiest way to input right to left text is to use an Arabic or Hebrew keyboard for Windows or Mac and type the text into a text or HTML document. The text will be typed in right to left. If you switch back to English, then text will return to left to right input. By switching keyboards, you can mix languages.
Many punctuation symbols such as the period, parentheses and others are actually "directionless" meaning their positioning may be LTR or RTL depending on what the directionality of adjacent characters are. This can cause unusual effects such as inside out-parentheses unless precautions are taken.
<p lang="he">(אבג)</p> vs.
3 Hebrew letters (אבג) - aleph, beth, gimmel
<p>3 Hebrew letters (<b lang="he" class="red">אבג</b>) -<b> aleph, beth, gimmel </b></p>
There are several methods to mark a document or passage as dir="rtl" or dir="ltr".
Note that unlike align="right", the punctuation will also relocated. For instance sentence periods appear towards the "begining" or the left edge of a line and bullet points are alinged to the right.
Use the code <html dir="rtl" lang=""> to ensure that all paragraphs and headers are right aligned and that the page language is set to either Hebrew (he) or Arabic (ar).
Use the code <html dir="ltr" lang=""> to signify that a page has left-to-right alignment. This could be important if your site is multilingual or a large segment of readers from the Middle East.
Use this syntax to declare an "rtl" document and page language. Note that this statement also declares the language as Arabic (ar).
<html xmlns="http://www.w3.org/1999/xhtml" dir="rtl" xml:lang="ar" lang="ar">
The dir="rtl" attribute can be added to DIV's, P's headers and other tags to set alignment for those areas in the text.
Sample HTML - <p lang="ar" dir="rtl">...</p>
Use the CSS property direction: rtl for right to left text or direction: ltr for left to right text. Note that this option also places the punctuation to the left of the text.
<div style="direction: rtl" >
<p>Look for me WAAAAAY on the right!!!</p>
Look for me WAAAAY on the right!!!!
If you wish to insert an Arabic or Hebrew word in an English document, you can use the <bdo dir="rtl"> to temporarily override the left-to-right direction of text as needed.
Should see olleh if <bdo> is working.
If you are developing a Hebrew or Arabic Web site, you can use <bdo dir="ltr">English Text Here</bdo> to insert English left-to-right text.
These Web sites provide additional information on developing Right-to-Left Pages.