CSS Questions & Answers – Specifying sizes, colors and files

This set of CSS Multiple Choice Questions & Answers (MCQs) focuses on “Specifying sizes, colors and files”.

1. Which of the following is not an Absolute Unit?
a) px
b) em
c) pt
d) mm
View Answer

Answer: b
Explanation: em is a Relative Unit

2. Which of the following unit represent the viewport’s width?
a) vh
b) vmin
c) vw
d) ch
View Answer

Answer: c
Explanation: Self-explainatory.

3. Which of the following property sets in a shorthand form any or all background properties?
a) color
b) wrap
c) background
d) all of the mentioned
View Answer

Answer:
Explanation:

advertisement
advertisement
Syntax: background: background-color

4. Which of the following Color Format can also be defined using the keyword rgb, followed by three numbers between 0 and 255, contained in parentheses and separated by commas, with no spaces between them?
a) RGB Color
b) RGBa Color
c) HSL Color
d) HSLa Color
View Answer

Answer: a
Explanation:

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!
Example: p {color:rgb(0%,10%,50%);}

5. Which of the following is not a attribute of the audio element?
a) controls
b) src
c) check
d) loop
View Answer

Answer: c
Explanation: Self-explainatory.
advertisement

6. Which of the following element is used to specify multiple media resources for media elements like audio and video?

a) <source>
b) <link>
c) <script>
d) <src>
View Answer
Answer: a
Explanation: Self-explainatory.
 
 

7. Which of the following Protocol enables a hyperlink to access a file on the local file system?
a) https
b) ftp
c) file
d) telnet
View Answer

Answer: c
Explanation: Self-explainatory.
advertisement

8. Which of the following element is used for linking a External Files to the html page?

a) <script>
b) <style>
c) <link>
d) all of the above
View Answer
Answer: c
Explanation: Self-explainatory.
 
 

9. Which of the following attribute specifies the URL of the linked resource?
a) src
b) link
c) rel
d) href
View Answer

Answer: d
Explanation: href attribute specifies the URL of the linked resource. A URL might be absolute or relative.

10. Which of the following color has this value #ff0000?
a) blue
b) green
c) red
d) yellow
View Answer

Answer: c
Explanation: Self-explainatory.

Sanfoundry Global Education & Learning Series – CSS.

To practice all areas of CSS, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.