How to make a content center in the page

To make center display of any content, you should have these properties for the content:

1. display: block;

2. width:500px;

3. margin: 0 auto;


<div class="content">



The css should be:


margin:0 auto;


width: 50%;}

The output would be like that

This is content