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