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 −