Home  >  Article  >  Web Front-end  >  Create a right-to-left paragraph in HTML5

Create a right-to-left paragraph in HTML5

WBOY
WBOYforward
2023-08-19 22:19:051033browse

Create a right-to-left paragraph in HTML5

Use the dir attribute in HTML to set a right-to-left paragraph. Add the rtl value to the dir attribute so that the text flows from right to left.

Example

You can try running the following code to implement the 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>

The above is the detailed content of Create a right-to-left paragraph in HTML5. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete