<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>grid</title>
    <style>
        .container {
            border: dotted 1px palegoldenrod;
            padding: 1em;
            text-align: center;

            display: grid;
            grid-column-gap: 20px;
            grid-row-gap: 20px;
            /* grid-template-columns: 2fr 2fr 2fr; */
            grid-template-columns: repeat(4, 2fr);
            grid-template-rows: 200px auto auto;
            grid-template-areas: "green red yellow"
                                    "pink blue dark";
            
            justify-content: center;
        }
        .item {
            border: dashed 2px palegreen;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
        <div class="item">6</div>
        <div class="item">7</div>
        <div class="item">8</div>
        <div class="item">9</div>
        <div class="item">10</div>
    </div>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.