center h1 css

CSS
h1 {
    width:500px;
    margin: 0 auto;
    background: gray;
    text-align: center;
}
Source

Also in CSS: