Get your own website Result Size: 625 x 534
x
 
<!DOCTYPE html>
<html>
<head>
<style>
.grid-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1fr;
  gap: 10px;
  background-color: dodgerblue;
  padding: 10px;
}
.grid-container > div {
  background-color: #f1f1f1;
  color: #000;
  padding: 10px;
  font-size: 30px;
  text-align: center;
}
</style>
</head>
<body>
<h1>The grid-template-columns Property</h1>
<p>You can use the <em>grid-template-columns</em> property to specify the number of columns in your grid layout.</p>
<div class="grid-container">
  <div>1</div>
  <div>2</div>
  <div>3</div>  
  <div>4</div>
  <div>5</div>
  <div>6</div>  
  <div>7</div>
  <div>8</div>
</div>
</body>
</html>