AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Setting direction at the document level Base directionĮxamples in this document may be shown as images to avoid problems for those with a browser that doesn't produce what was intended.Ĭode samples containing Arabic and Hebrew text may be displayed in different ways, none of which are usually satisfactory. Handling bidirectional inline text is dealt with in the separate article, Inline markup and bidirectional text in HTML. Consider using the dirname attribute on forms to send information about direction to the server in addition to the usual form data. Set the dir attribute to auto on forms and inserted text in order to automatically detect the direction of content supplied at run-time. Avoid HTML attributes with values of 'right' and 'left'. to make it easy to manage direction changes during localisation. But do use logical ('end' and 'start') on properties or values related to margins, padding, alignment, etc. Never use CSS to apply the base direction. If the overall document direction is right-to-left, add dir="rtl" to the html tag.īelow the html tag, only use the dir attribute on structural elements on the rare occasions when the base direction needs to change in order for the text to display correctly. Many different languages are written with these scripts, including Arabic, Dhivehi, Hebrew, Mandinka, Pashto, Persian, Pular, Sindhi, Syriac, Urdu, Yiddish, etc. It is essential to support languages that use right-to-left scripts such as Adlam, Arabic, Hebrew, N'Ko, Syriac, and Thaana. The dir attribute is used to set the base direction of text for display. It also describes some other elements and attributes related to direction. at the document level and for elements like paragraphs, tables and forms.įor handling bidirectional text with inline markup you should read the separate article, Inline markup and bidirectional text in HTML. This article looks at ways of handling text direction for structural markup in HTML, ie.
0 Comments
Read More
|