Special welcome gift. Get 50% off your first courses with code “AS50”. Find out more!

HomeCoachingInterviewCSS Q/AIf background and colour should always be set together, why do they exist as separate properties?
about us new 2

If background and colour should always be set together, why do they exist as separate properties?

Answer:

The reasons for this are as follows:

1. It increases the legibility of the style sheets. The background property is a complex property in CSS. If it is combined with color, the complexity will further increase.
2. Color is inherited, but background isn’t. This can further increase the confusion.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

Categories

ads sidebar 1

You May Also Like

It’s about making websites work wherever the web is. Different devices with different sizes and different capabilities. Responsive design is...
It’s an alternative to graceful degradation, which concentrates on the matter of the web. The functionality is same, but it...