Code subject: change the direction of text in your page
Posted: Fri Jan 06, 2012 11:17 pm
Joined: Tue Mar 27, 2007 10:55 pm Posts: 2279 Location: Earth Has thanked: 39 time Have thanks: 61 time
Following show example for controlling the direction of your text in the HTML. We have applied two different ways of controlling the text direction , the first way is using dir attribute in the body tag and using value rtl or ltr ( right to left and left to right). The other way is using css. Changing the direction helps you to have many languages in your site. For example English language is ltr while Arabic language is rtl.
Code:
<html> <head> <title>Control your text direction </title> <style rel="stylesheet" type="text/css"> body {
<body dir="rtl"> <h1>Different direction for html part</h1> <div class="DirectionLTR">left to right div.</p> <div class="DirectionRTL">right to left div.</p> </body> </html>
_________________ Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )