0
Heading Alignment?
How do I align a heading in a specific location (left, center, right)? Or is this not allowed?
3 Answers
+ 2
All is allowed ;) ( but some things are harder to obtain :\ )
When you talk about 'heading', do you mean <h1>, <h2>... tags, or new HTML5 <header> one?
Anyway, they are all 'block' elements, meanings that they size their width as bigger as possible, so you can align the content of the box rather of the box in its parent... since you change it's display property for inlined-kind of...
So, headings are classicaly aligned with 'text-align' css property set for their content...
+ 1
<h1 align="center">
<header align="center">
That's it.
It's the simplest way to align any div.
+ 1
But 'align' attribute is deprecated in Html5... should be done with css ^^