how to center div content with style using css

This article gives some basic knowledge about making div content in the center of the screen. Few technique are listed below.

Using bootstrap
Example1:
Html code
<div>
 <div class='col-lg-12 text-align-center'>Catchy Sense</div>
</div>
Example2:
Html code
<div class='catchy'>
  <div class='catchy-text'>Catchy Sense</div>
</div>
Css code
.catchy {
 width:100;
 display:block;
 margin: 0 auto;
}
.catchy-text {
  text-align: center;
}
Example3:
Html code
<div class='catchy'>
  <div class='catchy-text'>Catchy Sense</div>
</div>
Css code
.catchy-text {
  text-align: center;
}
Example4:
Html code
<div class='catchy'>
  <div class='catchy-text'>Catchy Sense</div>
</div>
Css Code
.catchy-text {
    display: block;
    margin: 0 auto;
    width: 10%;
}
Example5:
Html code
<div class='catchy'>
  <div class='catchy-text'>Catchy Sense</div>
</div>
Css code
.catchy {
 display:block;
}
.catchy-text {
  text-align: center;
}