Using HTML and CSS
In this example, we define a grid container with the class “grid” and specify the number of columns using the `grid-template-columns` property. The `repeat(3, 1fr)` value creates three equal-width columns. We also set a gap between grid items using the `grid-gap` property. Each grid item has the class “grid-item” and is styled accordingly.
Creating a Grid Dynamically
In this example, we first add a new grid item by creating a `