📐 CSS Grid Template Areas Generator

Visually create grid layouts, auto-generate grid-template-areas code

⚙️ Grid Settings

Custom name:

🎨 Grid Editor (click cells to assign areas)

📝 Generated CSS Code

👁️ Layout Preview

❓ FAQ

What is CSS Grid template areas?

CSS Grid template areas (grid-template-areas) is a CSS property that uses named areas to define grid layouts. By naming grid cells and describing the layout with strings, it makes CSS layout code more intuitive and readable.

What is the syntax of grid-template-areas?

Syntax: grid-template-areas: 'header header header' 'sidebar main main' 'footer footer footer'; Each string represents a row, space-separated names represent each column's area, and . represents an empty cell.

How to use this generator?

Set the number of rows and columns, select an area name, then click grid cells to assign areas. Cells with the same name automatically merge into one area. The complete CSS code is generated and ready to copy.

What are the area naming rules?

Area names must be valid CSS identifiers (letters, numbers, hyphens). Cells with the same name must form a rectangular area. Use a dot (.) for empty cells.

FAQ (FAQ)

What is CSS Grid template areas?

CSS Grid template areas (grid-template-areas) is a CSS property that uses named areas to define grid layouts. By naming grid cells and describing the layout with strings, it makes CSS layout code more intuitive and readable.

What is the syntax of grid-template-areas?

Syntax: grid-template-areas: 'header header header' 'sidebar main main' 'footer footer footer'; Each string represents a row, space-separated names represent each column's area, and . represents an empty cell.

How to use this generator?

Set the number of rows and columns, select an area name, then click grid cells to assign areas. Cells with the same name automatically merge into one area. The complete CSS code is generated and ready to copy.