The align:centre does not not bring any change to the output | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

The align:centre does not not bring any change to the output

<html> <body> <h1>Headline</h1> <div style="background-color:green; color:white; padding:20px; align:centre;"> <p>Some paragraph text goes here.</p> <p>Another paragraph goes here.</p> </div> </body> </html>

3rd Aug 2022, 7:41 AM
We Doru
We Doru - avatar
3 Answers
+ 1
It’s text-align: center
3rd Aug 2022, 8:02 AM
John Doe
0
It's center not centre try that.
3rd Aug 2022, 8:00 AM
Chigozie Anyaeji 🇳🇬
Chigozie Anyaeji 🇳🇬 - avatar
0
Either use 'align' attribute for the <div> <div align="center"> ... </div> Or CSS rule `text-align` in style attribute for the <div> <div style="text-align: center;"> ... </div>
3rd Aug 2022, 9:24 AM
Ipang