html div to center code example Example: div align center .center { text-align: center; } // or <div style="text-align:center"> </div>