0
How do you make a heading be aligned to the center?
I tried <p align="center"><h1>Content is here</p></h1>, when I took away the heading it worked but with the heading it doesn't work.
5 Answers
+ 3
This way you're putting your head into your body. Headings and paragraphs are tags sharing the same level of importance. If you want a heading being aligned to the center write (outside the <p>...</p>) <h1 align="center">Centered Heading1</h1>.
+ 1
Or you could do it in CSS.
h1 { text-align:center; }
0
you could also try: <center><h1> Some Text</h1></center>
0
put your align attribute in the header tag not the paragraph tag. Here is what I mean
<p><h1 align="center">Header is centrally aligned </h1></p>
That should work
0
How will you displaya centre aligned,blue heading using any heading element?