Which CSS property is used to set the background color of an element?
- background-color
- border-color
- color
- text-color
The background-color property is specifically used to set the background color of an HTML element. It takes values in various formats like color names, hex codes, or RGB values.
Loading...
Related Quiz
- The "line-height" property can be set using units like px, em, and ________.
- For smoother transitions, the property will-________ can be used to hint the browser about what aspects of an element will change.
- CSS Houdini's ________ API is instrumental in creating complex animations that react to user input.
- You want to target all paragraphs that are immediately after an h2 element within the same container. Which CSS selector combination will you use?
- While using Bootstrap, a developer needs to override default styles for specific components. What is the best practice for doing this without affecting global styles?