<p align="center"> | Sololearn: Learn to code for FREE!


<p align="center">

I saw this <p align="center"> Blah blah </p> And I tried <p> <align="center"> Blah blah </p> But this didn't make the sentence to the center. Does < Align="center"> have to be always inside P? Is there any other way to make P to the center?

3/10/2019 3:24:28 AM


4 Answers

New Answer


Align is attribute


the part align="center" must be positioned INSIDE the opening <p>-tag: <p align="center"> Then it will work correctly. "align" is not an html-tag but an attribute which can be used to "decorate" various html-tags.


More current way to center a paragraph: <p style=“text-align:center;”> centered text </p>


Thank you guys!!!