HTML HEX MCQs
HTML HEX MCQs : This section focuses on color "HEX" of Html. These Multiple Choice Questions (mcq) should be practiced to improve the Html skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.
1. How the HEX value of color represented in HTML?
A. #rrggbb
B. #rrbbgg
C. #ggrrbb
D. #bbrrgg
View Answer
Ans : A
Explanation: #rrggbb is the correct way of representing a color in HTML.
2. Choose the correct option.
A. In HTML, rr,gg,bb of #rrggbb represents red, green and black color in hex values.
B. In HTML, rr,gg,bb of #rrggbb represents red, grey and black color in hex values.
C. In HTML, rr,gg,bb of #rrggbb represents red, grey and blue color in hex values.
D. In HTML, rr,gg,bb of #rrggbb represents red, green and blue color in hex values.
View Answer
Ans : D
Explanation: In #rrggbb, each three represents the intensity of red, green and blue colors respectively.
3. Fill in the blanks from one of the options given below so that the background of the paragraph is filled with color of color code #3cb371.
<!DOCTYPE html>
<html>
<body>
<p style="__________">A paragraph</p>
</body>
</html>
A. background-color:hex(#3cb371);
B. bg-color:hex(#3cb371);
C. background-color:#3cb371;
D. bg-color:#3cb371;
View Answer
Ans : C
Explanation: #3cb371 already reprsents that the color code is in HEX value. Writing hex before the code is wrong.
4. #ffffff is equivqlent to which color in rgb color representation?
A. rgb(0,0,0)
B. rgb(100,100,100)
C. rgb(90,90,90)
D. rgb(255,255,255)
View Answer
Ans : D
Explanation: Both #ffffff and rgb(255,255,255) represents white color.
5. Which color is #ff0000?
A. White
B. Black
C. Red
D. Blue
View Answer
Ans : C
Explanation: Since, the only rr is having #ff value and rest two are having 00, so the color will be red.
6. In HTML, black color can be represented as-
A. #000000
B. #aaaaaa
C. #bbbbbb
D. #ffffff
View Answer
Ans : A
Explanation: When all the three rr,gg,bb of #rrggbb have 00 value, it gives black color.
7. What is the total number of colors that can be represented using HEX system in HTML?
A. 16^3
B. 16^6
C. 2^6
D. 2^16
View Answer
Ans : B
Explanation: Each digit of #rrggbb can have 16 values (from 0 to F) and there are total of 6 digits. Hence, the total number of possible colors=166.
8. Choose the correct option.
A. In HEX color representation of HTML, #0f0 and #00ff00 represents same color.
B. In HEX color representation of HTML, color cannot be represented as #0f0.
C. In HEX color representation of HTML, color can be represented as #0f0 but it is not the same as #00ff00.
D. None of the above
View Answer
Ans : A
Explanation: In HTML, #00ff00 can be abbreviated as #0f0.
9. Which of the following color codes of HTML represent the same color?
(i) #00ff00
(ii) hsl(120,100%,50%)
(iii) rgb(255,99,71)
A. All three.
B. i and ii
C. i and iii
D. ii and ii
View Answer
Ans : B
Explanation: i and ii represents color green while iii represents color tomato.
10. Which of the following is equivqlent to rgb(255,99,71)?
A. #ff9971
B. #ffaa71
C. #ff6347
D. #ffa6c8
View Answer
Ans : C
Explanation: Converting 255,99 and 71 into hexadecimal, we get ff,63 and 47 respectively. Hence the equivalent color code will be #ff6347.
Also check :
Discussion