0

How to Have heading 1 and The Center?

I'm trying to make a heading with the center and I do this. <html> <head> <title> blah blah blah </title> </head> <body> <p align="center"> <h1>blah blah blah </h1> </p> and after I do that it doesn't show up! Any help?

27th Jun 2016, 6:13 PM
Anonymous Lulz
Anonymous Lulz - avatar
5 ответов
+ 2
1. Don't use HTML for layout and style. Use CSS. 2. Don't nest headings inside paragraphs. Do like this(I include the CSS for centering): <h1 style="text-align:center">Heading></h1> <p>Paragraph</p>
28th Jun 2016, 2:29 AM
ZinC
ZinC - avatar
+ 1
@Røhit, where did you learn to put a paragraph inside a heading? It's not even logical, not to mention it's incorrect HTML structure.
28th Jun 2016, 8:45 PM
ZinC
ZinC - avatar
+ 1
ZinC. The funny thing about HTML is that though Rohit is not using "best practices", yet his code works elegantly. Try it. There are several answers that come to mind, but why not just say <h1 align="center">Heading</h1>
29th Jun 2016, 4:31 AM
Daniel Chukwuji
Daniel Chukwuji - avatar
0
<h1><p align="center">bla bla bla</p></h1> use this and u will get what u want
28th Jun 2016, 4:54 PM
Røhit Yadav
Røhit Yadav - avatar
0
<h1 style="text-align:center;">Text here</h1>
13th Jul 2016, 2:43 PM
Andrew Agustin
Andrew Agustin - avatar