Align the text of the paragraph to the right: | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 8

Align the text of the paragraph to the right:

<html> <body align="center"> <div align =" "> <p>This is a line of text</p> </div> </body> </html>

8th Apr 2019, 9:09 AM
Meggy Spletzer
Meggy Spletzer - avatar
8 Answers
+ 4
/** CSS **/ p { text-align: right; } /** HTML **/ <p>Right aligned text.</p> I wouldn't recommend using inline css, when your code base increases it's best to keep css in their separate files.
8th Apr 2019, 11:57 AM
Victor Andersson
Victor Andersson - avatar
+ 3
You can use <div align = "right"> for aligning the text of paragraph tag to right.
8th Apr 2019, 9:25 AM
Arushi Singhania
Arushi Singhania - avatar
+ 2
Add align="right" to <p> <html> <body align="center"> <p align="right">This is a line of text</p> </div> </body> </html>
8th Apr 2019, 9:25 AM
VEDANG
VEDANG - avatar
+ 1
Align the text of the paragraph to the right: <html> <body align="center"> <div align="right"> <p>This is a line of text</p> </div> </body> </html>
25th Jul 2019, 5:00 AM
Cheddad Zoher
0
<html> <body align="center"> <div align="right"> <p>This is a line of text</p> </div> </body> </html>
2nd Aug 2019, 4:06 PM
GYANENDRA PAL SINGH
GYANENDRA PAL SINGH - avatar
0
<html> <body align="center"> <div align="right"> <p>This is a line of text</p> </div> </body> </html>
5th May 2020, 7:24 PM
Arif Hossain
Arif Hossain - avatar
0
13th May 2020, 3:01 PM
Shivani Patel
Shivani Patel - avatar
0
<html> <body align="center"> <div align ="right"> <p>This is a line of text</p> </div> </body> </html>
27th Dec 2020, 7:03 PM
Opanuga Stephen
Opanuga Stephen - avatar