Course contentsShow
← Web Development
Lesson 312 of 2,9826. CSS GridFree lesson

Grid Lines, Tracks, Cells, and Areas

Understanding the fundamental terminology: lines that divide the grid, tracks between them, cells, and areas.

Grid Lines, Tracks, Cells, and Areas

You'll learn the fundamental vocabulary that describes how CSS Grid divides and organizes space.

The Grid's Anatomy

When you create a grid container with display: grid, the browser divides that space using an invisible coordinate system. Understanding this system's parts is essential before you can position anything.

Think of a grid like a chessboard—to describe where pieces go, you need to understand the board's structure first.

Grid Lines

Grid lines are the invisible dividing lines that create your grid's structure. They run both horizontally and vertically, numbered starting from 1.

If you define 3 columns, you automatically get 4 vertical lines (one before the first column, one after each column). Lines are numbered from left-to-right and top-to-bottom by default.

Grid Tracks

Grid tracks are the spaces between two adjacent grid lines. A track is either a row or a column.

When you hear "3 columns," you're really talking about 3 column tracks. Each track can have its own size—some might be 200px wide, others might use 1fr (a flexible unit).

Grid Cells

Grid cells are the individual boxes created where a row track and column track intersect. A cell is the smallest unit in your grid.

On a chessboard, each square is a cell—the intersection of one row and one column.

Grid Areas

Grid areas are rectangular spaces spanning one or more cells. An area might be a single cell or a large rectangle covering multiple rows and columns.

Think of it as selecting multiple squares on the chessboard to mark a territory.

Key Takeaway: Grid lines divide the space, tracks are the rows/columns between lines, cells are individual boxes at intersections, and areas are rectangular regions spanning multiple cells.