Use margins: auto we can position a
element horizontally by automatically adjusting the left and right margins.
.deepak {width: 50%;margin: 0 auto;}
Using flexbox
You can use flexbox to center a horizontally within its containing element.
.deepak {display: flex;justify-content: center;}.deepak div {width: 50%;}


