
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
Background Repeat Using CSS
The CSS background-repeat property is used to define how the background image repeats itself.
Syntax
The syntax of CSS background-repeat property is as follows −
Selector { background-repeat: /*value*/ }
Example
The following examples illustrate CSS background-repeat property −
<!DOCTYPE html> <html> <head> <style> body { background-image: url("https://www.tutorialspoint.com/images/microsoftproject.png"); background-repeat: repeat; } </style> </head> <body> </body> </html>
Output
This gives the following output −
Example
<!DOCTYPE html> <html> <head> <style> ul { background-image: url("https://www.tutorialspoint.com/images/questions-answers.png"); background-repeat: space repeat; } </style> </head> <body> <h2>Tutorials</h2> <ul> <li>Java</li> <li>C#</li> <li>Etherum</li> <li>DBMS</li> <li>OS</li> </ul> </body> </html>
Output
This gives the following output −
- Related Articles
- Background Repeat in CSS
- Repeat the background image with CSS
- Usage of background-repeat property in CSS
- Repeat the background image both horizontally and vertically with CSS
- Setting Background Position using CSS
- Setting Background Image using CSS
- Setting up Background Color using CSS
- Styling Background of Elements Using CSS
- CSS border-image-repeat
- How to create linear gradient background using CSS?
- Repeat a linear gradient with CSS
- Repeat a radial gradient with CSS
- CSS background property
- CSS Background Properties
- How to set background image in CSS using jQuery?

Advertisements