এলিমেন্টের ভেতরের টেক্সট কোন দিক থেকে পড়া হবে (বাম-দায় বা ডান-বাম) তা নির্ধারণ করতে dir অ্যাট্রিবিউট ব্যবহার করা হয়।
উদাহরণ
<!DOCTYPE html> <html> <body> <p>This is demo text from left-to-right.</p> <p dir = "rtl">This is demo text from right-to-left.</p> </body> </html>