Center contents on a HTML webpage

I needed to look up how one can center the whole contents on a webpage by using CSS (the <center>-Tag is of no use anymore, as it will fall away with HTML 5).
I didn’t know it is so easy:

body {
        margin: 0 auto;
        width: 740px;
}

One thought on “Center contents on a HTML webpage

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>