I know at first this seems like a very stupid question, but I have a good reason for asking it. Even though I might just be misled.
For EVER I have been using the <center>Text</center>
tag to have text appear centered horizontally.
Apparently this tag is depreciated, and is no longer used. So I have tried using <p align="center">Text</p>
although it seems to be buggy and I have read that It does not work in all browsers.
On top of that, when I have a header <h#>
tag within a <p>
tag there is also a validation issue.
The point is, I want to do this right, and although the center tag is tolerable, it is apparently not the best way to go. Why has it been depreciated? And what is your alternative? I honestly have no idea where to go from here.
P.S. Asking this question kills me inside.
EDIT::
Even while using the accepted answer;
<p style="text-align:center"></p>
I am not able to center <h>
tags within the <p>
tags. I have tried and read that <h# align="center">
does not work in all browsers and I have tried applying the style to the header tag with no avail. What do you think?