+ 1

<p align="centre"></p> please help me I'm new on html this code not work?

https://code.sololearn.com/W26EM3bO78Ho/?ref=app

6th Sep 2017, 4:30 PM
Parvinder Singh
Parvinder Singh - avatar
5 ответов
+ 5
you can use <center></center> instead of css( <p align="center"></p>) <html> <head> <title>firsr page</title> </head> <body> <p> <center> Hello World<br>I'm parvinder can iearn code easly </center> </p> </body> </hrml>
6th Sep 2017, 5:38 PM
Ranjan Bagri
Ranjan Bagri - avatar
+ 2
In html5 you're not allowed to use 'align' attribute nor <center> element: even if browsers will right auto-correct it, it's still invalid code... The only right way is to use 'text-align' css property, with value 'center' ^^ Anyway, in all cases (unallowed ones were allowed in previous versions of Html -- but require specific doctypes) the right attribute/property value is not 'centre' but 'center' ;P
7th Sep 2017, 10:37 AM
visph
visph - avatar
+ 1
The <p> with the text should be the one with the inline styling eg: <hrml> <head> <title>firsr page</title> </head> <body> <p align="center"> Hello World<br>I'm parvinder can iearn code easly </p> </body> <p></p> </hrml> ...and your root tag should be <html> instead of <hrml>
6th Sep 2017, 4:34 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 1
@Nomeh your HTML element is defined as HRML please check it. I think Kayla already answered your question.
6th Sep 2017, 4:53 PM
Elvis Ngboki
Elvis Ngboki - avatar
+ 1
@Gabriel You use CSS code
6th Sep 2017, 4:58 PM
itsAPK 😎
itsAPK 😎 - avatar