CSS Questions & Answers – Introduction to CSS

This set of CSS Problems focuses on “Introduction to CSS”.

1. CSS stands for __________
a) Color Style Sheets
b) Cascade Sheets Style
c) Cascade Style Sheet
d) Cascading Style Sheets
View Answer

Answer: d
Explanation: CSS is a style sheet language which stands for Cascading Style Sheet.

2. In CSS, h1 can be called as _______
a) Selector
b) Attribute
c) Value
d) Tag
View Answer

Answer: a
Explanation: HTML element h1 is used in CSS for styling then it is also called a selector. Attributes are the special words which control the element’s behaviour. To show the start and end of HTML element, tag is used.

3. In css, “color:red” can be called as _____________
a) Selector
b) Rule
c) Declaration
d) Value
View Answer

Answer: c
Explanation: In CSS, color:red is the declaration for an element saying that the given element has to apply a red color. Color is one of CSS property.
advertisement
advertisement

4. Which of the following attributes is used to specify elements to bind style rules to?
a) id
b) class
c) tag
d) all of the mentioned
View Answer

Answer: d
Explanation: In CSS, styling elements can be done by id, class and tag attribute.

5. Which selector is used to specify a rule to bind a particular unique element?
a) id
b) class
c) tag
d) both class and tag
View Answer

Answer: a
Explanation: For binding a particular unique element, id selectors are used. While for group of elements, class selector can be used.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. In CSS, “font-size” can be called as ________
a) Selector
b) Rule
c) Property
d) Property-Name
View Answer

Answer: d
Explanation: In CSS, font-size is a property-name which increases/decreases the font of text.

7. _________ selectors are used to specify a group of elements.
a) id
b) class
c) tag
d) both class and tag
View Answer

Answer: b
Explanation: Class selectors are used to specify a group of elements. Id selector specifies a particular unique element.
advertisement

8. Which of the following tag is used to embed css in html page?
a) <script>
b) <style>
c) <css>
d) <!DOCTYPE html>
View Answer

Answer: b
Explanation: <style> </style> tag is used to embed CSS in HTML page, while <script> </script> is used to embed JS in HTML. <!DOCTYPE html> is HTML5 declaration.

9. __________ has introduced text, list, box, margin, border, color, and background properties.
a) css
b) html
c) ajax
d) php
View Answer

Answer: a
Explanation: CSS is a style sheet language which stands for Cascading Style Sheet. CSS has introduced text, list, box, margin, border, color, and background properties.
advertisement

10. Is it the best way to include H1 heading only one time on the web page.
a) True
b) False
View Answer

Answer: a
Explanation: It is good practice to include H1 heading only once and to use H2-H6 heading in other areas.

Sanfoundry Global Education & Learning Series – CSS.

To practice all areas of CSS Problems, 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.