background is a shorthand to set
all the background style properties together at a time.
Below is the list of all the background properties and their default values:
| PROPERTY | DEFAULT VALUE |
|---|
| background-color | transparent |
| background-image | none |
| background-repeat | repeat |
| background-attachment | scroll |
| background-position | 0% 0% |
| background-size | auto |
| background-clip | border-box |
| background-origin | padding-box |
We can check the above default values are
correct or not, by comparing the result of below
two code snippets:
Let's try that in the code blocks:
Now, let's try without the default values, this should result same: