Programming in HTML5 with JavaScript and CSS3 — Question 65

Which CSS3 code segment styles the text color of EM elements to be red and semi-transparent?

Answer options

Correct answer: B

Explanation

The correct answer is B because it uses the rgba function to set the red color with 50% opacity, making it semi-transparent. Option A is incorrect due to the use of an invalid hex code format for transparency. Option C has a wrong alpha value that doesn't achieve the desired semi-transparency, and option D incorrectly uses percentage values which are not valid for rgba.