CSS MCQ Questions on Fundamental

CSS MCQ Questions on Fundamental Hello Student ! here provide CSS Multiple Choice Questions and Answers on Fundamental. here you can learn and practice basic questions.

CSS MCQ Questions on Fundamental

1. What is CSS?

a) CSS is a style sheet language
b) CSS is designed to separate the presentation and content, including layout, colors, and fonts
c) CSS is the language used to style the HTML documents
d) All of the mentioned

Answer: d
Explanation : CSS is a style sheet language that stands for Cascading Style Sheet and is used to style HTML documents. CSS is mainly designed to separate the presentation and content, including layout, colors, and fonts.

2. Which of the following tag is used to embed css in html page?

a) <css>
b) <!DOCTYPE html>
c) <script>
d) <style>

Answer : d
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.

3. Which of the following CSS selectors are used to specify a group of elements?

a) tag
b) id
c) class
d) both class and tag

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

4. Which of the following has introduced text, list, box, margin, border, color, and background properties?

a) HTML
b) PHP
c) CSS
d) Ajax

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

5. Which of the following CSS framework is used to create a responsive design?

a) django
b) rails
c) larawell
d) bootstrap

Answer: d
Explanation : Bootstrap is a free and open-source collection of tools for creating websites and web applications. It contains HTML- and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. It aims to ease the development of dynamic websites and web applications.

6. Which of the following CSS selector is used to specify a rule to bind a particular unique element?

a) tag
b) id
c) class
d) both class and tag

Answer: b
Explanation : For binding a particular unique element, id selectors are used. While for a group of elements, class selector can be used.

7. Which of the following type of HTML tag is used to define an internal style sheet?

a) <script>
b) <link>
c) <class>
d) <style>

Answer : d
Explanation : <style> tag is used to define an internal style sheet in HTML document.

8. Which of the following CSS property is used to make the text bold?

a) text-decoration: bold
b) font-weight: bold
c) font-style: bold
d) text-align: bold

Answer : b
Explanation : The font-weight property is used for setting the thickness and boldness of the font. It is used to define the weight of the text. The available weight depends on the font-family, which is used by the browser.

9. What will be the output of following CSS code snippet?

h1 {color: “green”;}
a) nothings happen
b) error occurs
c) heading becomes dark-green
d) heading becomes green

Answer : a
Explanation : Output of the above code snippet won’t happen as the declaration syntax is wrong. The correct declaration is : h1 { color: green; } which will yield an output. In CSS, we don’t write the value in double quotes.

10. Which of the following CSS style property is used to specify an italic text?

a) style
b) font
c) font-style
d) @font-face

Answer : c
Explanation : font-style property is used to specify an italic text. font-style property has three values (normal, italic & oblique).

Be the first to comment

Leave a Reply

Your email address will not be published.


*