CSS Playground

Learn CSS by Playing

Drag sliders, pick options, and watch CSS happen in real time. When you're happy, click Copy CSS.

Lab 1

Box Model

Control margin, border, padding, and content size. Watch the total space change.

Width: 200px
Height: 120px
Padding: 20px
Border Width: 3px
Margin: 20px
Border Style
Border Radius: 8px
box-sizing
Box Color
Total Size
Content
HTML

          
CSS

          
Lab 2

Flexbox

Pick flex properties from dropdowns and see how items arrange themselves.

flex-direction
justify-content (main axis)
align-items (cross axis)
flex-wrap
gap: 12px
Number of items: 4
Presets
HTML

          
CSS

          
Lab 3

CSS Grid

Set columns, rows, and gap — watch the grid form. No code required.

Columns: 3
Rows: 2
Gap: 12px
Column Sizing
Row Height: 80px
align-items
justify-items
Presets
HTML

          
CSS

          
Lab 4

CSS Positioning

Switch between position values and drag top/left sliders to see how each one behaves.

position
top: 0px
left: 0px
z-index: 1

relative: Element stays in normal flow but can be nudged with top/left. Other elements don't move.

Other element
Other element
Box
HTML

          
CSS

          
Lab 5

Typography & Colors

Experiment with fonts, sizes, spacing, and colors. See how typography changes the feel.

Font Family
Heading Size: 2rem
Body Size: 1rem
Font Weight: 400
Line Height: 1.6
Letter Spacing: 0em
Text Align
Text Color
Background
Presets

The Quick Brown Fox

Typography is the art and technique of arranging type to make written language legible, readable, and appealing when displayed. Good typography makes content easy to consume and gives your website a professional feel.

HTML

          
CSS