

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do we set the text direction for the content in an element in HTML?
Use the dir attribute in HTML, to set the text direction for the content in an element. You can try to run the following code to implement dir attribute −
Example
<!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>
- Related Questions & Answers
- How do we include the direction of text display in HTML?
- How to set text direction in HTML?
- How do we set the type of element in HTML?
- How do we set text font in HTML?
- How to set that the text direction will be submitted in HTML?
- How do we include an emphasized text in HTML?
- How to set the text direction with JavaScript?
- How to set HTML content of an element using jQuery?
- How do we display the thickness of the border of an element in HTML?
- How do we set the visible number of lines in a text area in HTML?
- How do we create the title of the text track in HTML?
- How do we set what value is the optimal value for the gauge in HTML?
- Set the direction of a text with CSS
- How do we include big text in HTML?
- How do we add bold text in HTML?
Advertisements