+ 3

Center doesn’t work

Can anyone please explain why the text is not aligned in the center? <p align=“center”> <h1><i>First code</i></h1> </p> https://code.sololearn.com/W9JwNTSL02ls/?ref=app

29th Apr 2019, 2:43 PM
Shuley
Shuley - avatar
5 Answers
+ 6
try this : <h1 align="center"><i>Hello There</i></h1> You don't need p tag. Don't use p and h tags together!
29th Apr 2019, 2:48 PM
voja
voja - avatar
+ 4
Seems centred now. Maybe because of voja 's suggestion.
30th Apr 2019, 1:19 AM
Sonic
Sonic - avatar
+ 3
voja thank you so much
29th Apr 2019, 2:50 PM
Shuley
Shuley - avatar
+ 1
Thanks for the help Coder im still in the beginning of learning html i just learned yesterday about block and inline tags so thank you. btw where did you learn coding only here on sololearn or on different places?
30th Apr 2019, 3:17 PM
Shuley
Shuley - avatar