Create a paragraph with a right-to-left direction in HTML5

HTMLWeb DevelopmentFront End Technology

Use the dir attribute in HTML to set a paragraph with right-to-left direction. Add the value rtl to the dir attribute for the text to be placed from right-to-left.

Example

You can try to run the following code to implement dir attribute −

<!DOCTYPE html>
<html>
   <body>
      <p dir="rtl">This is demo paragraph. This is demo paragraph.
         This is demo paragraph. This is demo paragraph. This is demo paragraph.
         This is demo paragraph. This is demo paragraph.</p>
   </body>
</html>
raja
Published on 13-Mar-2018 12:42:47
Advertisements