content center with y css code example Example: how to assign something in center inside a div P { text-align: center } H2 { text-align: center }