+ 1
<p align="centre"></p> please help me I'm new on html this code not work?
5 Respuestas
+ 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>
+ 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
+ 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>
+ 1
@Nomeh your HTML element is defined as HRML please check it.
I think Kayla already answered your question.
+ 1
@Gabriel You use CSS code