In this case:
h1 {
text-align:center;
}
jsFiddle example
The margin:auto rule is used when you set a width on the element, which you haven’t done.
In this case:
h1 {
text-align:center;
}
jsFiddle example
The margin:auto rule is used when you set a width on the element, which you haven’t done.