Developer tools

CSS grid generator

Drag across a grid to mark named areas, and copy the grid-template-areas CSS and the HTML.

Runs in your browser. Nothing you enter is uploaded.

Drag across cells to make an area. Click an area to remove it.

CSS
HTML

About this tool

The CSS grid generator lets you drag across cells to mark named areas and copies the matching grid-template-areas CSS and HTML. Grids go up to 12 columns and 12 rows, and cells without an area are written as a dot. Area names are cleaned up into valid CSS identifiers.

How do I remove or change an area?
Click an area to remove it. Drawing a new area over existing ones replaces any area it overlaps.
Can an area have an L shape?
No. CSS grid areas must be rectangles, so each drag makes one rectangle, and reusing a name replaces the older area with that name.