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?
5 Respostas
+ 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>
+ 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.
+ 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>
0
<h1><p align="center">bla bla bla</p></h1> use this and u will get what u want
0
<h1 style="text-align:center;">Text here</h1>