Which of the options is not a valid CSS color specification?

Learn web design with our comprehensive test guide. Improve your skills with flashcards and multiple choice questions. Each question includes hints and explanations. Get ready to ace your exam!

Multiple Choice

Which of the options is not a valid CSS color specification?

Explanation:
In CSS, colors can be defined using hex codes, rgb() with numeric channels, or named colors. The hex form (#000000) is valid, rgb(0,0,0) is valid, and a named color like blue is valid. The rgb form with color names inside it—rgb(red, green, blue)—is not valid because rgb() must take numeric values (0-255 or percentages) for each channel, not words. Since those are not numbers, the browser cannot interpret the color.

In CSS, colors can be defined using hex codes, rgb() with numeric channels, or named colors. The hex form (#000000) is valid, rgb(0,0,0) is valid, and a named color like blue is valid. The rgb form with color names inside it—rgb(red, green, blue)—is not valid because rgb() must take numeric values (0-255 or percentages) for each channel, not words. Since those are not numbers, the browser cannot interpret the color.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy