The background-repeat property controls whether a background image tiles across an element. By default, backgrounds repeat in both directions, but you can limit tiling to one axis or turn it off completely.
01
Tiling Basics
Repeat or stop backgrounds.
02
Axis Control
repeat-x and repeat-y.
03
no-repeat
Single background images.
04
space & round
Advanced tiling behavior.
05
Patterns
Build textures and grids.
06
With size
Pair with background-size.
Fundamentals
Definition and Usage
The background-repeat CSS property defines how background images are repeated within an element. When a background is smaller than its container, the browser tiles it to fill the area unless you tell it otherwise.
This property is essential for patterns, textures, and decorative tiles. It is equally important for no-repeat layouts where a photo, logo, or icon should appear only once.
💡
Beginner Tip
Most hero sections and card layouts use background-repeat: no-repeat; so the image does not tile unexpectedly.
Foundation
📝 Syntax
Apply background-repeat after setting a background-image:
repeat tiles normally. space adds gaps between tiles. round stretches tiles so the area fills without clipping.
🧠 How background-repeat Works
1
You add a background image
Set an image, gradient, or pattern with background-image.
Background
2
You choose a repeat mode
Use background-repeat to tile in both directions, one axis, or not at all.
Tiling rule
3
You control tile size
Set background-size so each tile is the size you expect before repeating.
Tile size
=
▦
Controlled background coverage
You decide whether the background tiles into a pattern or appears once as a single image.
Compatibility
Universal Browser Support
background-repeat is supported in all modern browsers. Basic values like repeat, repeat-x, repeat-y, and no-repeat have excellent legacy support.
✓ Baseline · All browsers
Reliable background tiling everywhere
Chrome, Firefox, Safari, Edge, and Opera support all common repeat keywords.
99%Modern browser support
Google Chrome1+ · Desktop & Mobile
Full support
Mozilla Firefox1+ · Desktop & Mobile
Full support
Apple Safari1+ · macOS & iOS
Full support
Microsoft Edge12+ · Modern versions
Full support
Opera10.5+ · Modern versions
Full support
Fallback behavior
Older browsers support repeat, repeat-x, repeat-y, and no-repeat. Use those as safe defaults when space or round are not required.
💻
space and roundSupported in modern browsers; fall back to repeat if needed
Fallback
background-repeat property99% supported
Bottom line: Use background-repeat confidently. It is one of the most stable CSS background properties.
Wrap Up
Conclusion
The background-repeat property controls whether background images tile and in which directions. It is essential for patterns, textures, and any layout where a single image should not repeat unexpectedly.
Pair it with background-size and background-position for complete background control, or continue to background-size to learn how to resize tiles and hero images.
Set background-size when using small repeating patterns
Use repeat-x or repeat-y for striped or column layouts
Test patterns at different screen sizes
Consider space or round for evenly distributed icon grids
❌ Don’t
Forget no-repeat on large images that should appear once
Assume a background will not tile by default
Use tiny repeating images without setting an explicit tile size
Rely on space or round without checking older browser needs
Ignore performance when using large tiled background images
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about background-repeat
Use these points when tiling or stopping background images.
5
Core concepts
▦01
Default Is repeat
Tiles both directions.
Default
↔02
One-Axis Tiling
repeat-x and repeat-y.
Axes
🖼️03
no-repeat
Single image layouts.
Common
📊04
space & round
Smart tiling options.
Advanced
🛠05
With background-size
Control tile dimensions.
Pair
❓ Frequently Asked Questions
The background-repeat property controls whether and how a background image tiles within an element. It can repeat in both directions, one direction, or not at all.
The initial value is repeat, which tiles the background both horizontally and vertically until the element is filled.
Use no-repeat when you want a single background image, such as a hero photo, logo, or decorative icon that should appear only once.
space repeats the image without clipping and adds gaps between tiles. round repeats the image and stretches or shrinks tiles so the area fills without gaps.
Yes. Use repeat-x for horizontal tiling only or repeat-y for vertical tiling only.