Which HTML attribute is used to change text color in older HTML versions?
A
font B
style C
color D
text
Analysis & Theory
The `color` attribute (used with `<font>`) was used in older HTML, but it's now deprecated.
Which CSS property is used to set the text color in HTML?
A
background B
color C
font-color D
text-color
Analysis & Theory
`color` is the CSS property used to change the color of text.
Which CSS property sets the background color of an HTML element?
A
bgcolor B
background C
background-color D
back-color
Analysis & Theory
`background-color` sets the background color of an element using CSS.
Which of these is a valid way to define red in HTML/CSS?
A
#FF0000 B
rgb(255,0,0) C
red D
All of the above
Analysis & Theory
Red can be defined using named colors, hex codes, and RGB values in CSS.
What does the hex color code `#000000` represent?
A
White B
Red C
Black D
Blue
Analysis & Theory
`#000000` is the hex code for black.
Which HTML tag supports the `bgcolor` attribute (now deprecated)?
A
<div> B
<body> C
<table> D
All of the above
Analysis & Theory
`bgcolor` was used in older HTML on `<body>`, `<table>`, and others but is now replaced by CSS.
Which of these is a valid RGB color code?
A
rgb(0,0,0) B
rgb(256,256,256) C
rgb(-1,0,0) D
rgb(300,0,0)
Analysis & Theory
`rgb(0,0,0)` is valid and represents black. RGB values must be from 0 to 255.
What does the CSS color `rgba(255, 0, 0, 0.5)` represent?
A
Red with 50% transparency B
Pink color C
Blue with 50% opacity D
Invalid CSS
Analysis & Theory
`rgba` adds an alpha (opacity) value to RGB colors. Here, it's red with 50% transparency.
Which color format allows setting opacity?
A
Hex code B
Named color C
RGB D
RGBA
Analysis & Theory
`RGBA` allows you to set color with transparency using the alpha channel.
What is the default text color in most browsers if not set?
A
Black B
Gray C
White D
Blue
Analysis & Theory
Most browsers render text in black by default unless styled otherwise.