<!DOCTYPE html> <html> <head> <title> my first page </title> </head> <body> <p width="160px">This is a paragraph.</p> </body> </html> it's not working correctly.I mean this sentence not appering in 160px size.why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

<!DOCTYPE html> <html> <head> <title> my first page </title> </head> <body> <p width="160px">This is a paragraph.</p> </body> </html> it's not working correctly.I mean this sentence not appering in 160px size.why?

please explain step by step

25th Aug 2016, 10:03 AM
Krishna Teja
Krishna Teja - avatar
3 Answers
+ 1
To limit the space for your text try: <p style="width: 160px;">This is a paragraph.</p> If you want to change the size of your text use the font-size tag
25th Aug 2016, 11:05 AM
Dina Dinarax
Dina Dinarax - avatar
+ 1
p tag doesn't have width attribute. To apply width to p tag u should use style attribute. <p style='width: 160px'>This is a paragraph</p>
25th Aug 2016, 2:27 PM
Dipal Shah
Dipal Shah - avatar
0
thanks to all
25th Aug 2016, 2:43 PM
Krishna Teja
Krishna Teja - avatar