Usage of CSS align-items property center value

Use the align-items property with value center to align flex items in the center.

You can try to run the following code to implement the center value


Live Demo

<!DOCTYPE html>
         .mycontainer {
            display: flex;
            background-color: orange;
            align-items: center;
            height: 150px;
            width: 600px;
         .mycontainer > div {
            background-color: white;
            text-align: center;
            line-height: 40px;
            font-size: 25px;
            width: 100px;
            margin: 5px;
      <div class = "mycontainer">