center items within div code example Example: how to assign something in center inside a div P { text-align: center } H2 { text-align: center }