text align horizontal center css code example Example: center text in css .class { text-align: center; }