In this case:
h1 { text-align:center; }
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; }
The margin:auto rule is used when you set a width on the element, which you haven’t done.