Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Css MCQ

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

CSS MCQ Questions and Answer PDF

1. The CSS property used to control the element's font-size is__________

1. font-size
2. text-size
3. text-style
4. None

Answer: font-size

2. The HTML attribute used to define the internal stylesheet is___________

1. style
2. <style>
3. <link>
4. <script>

Answer: <style>

3. Which of the following CSS property is used to set the background image of an
element?

1. background-color
2. background-image
3. background-attachment
4. None

Answer: background-image

4. Which of the following is the correct syntax to display the hyperlinks without any
underline?

1. a {decoration : no-underline;}
2. a {text-decoration : underline;}
3. a {text-decoration : none;}
4. None

Answer: a {text-decoration : none;}

5. Which of the following is the correct syntax to make the background-color of all
paragraph elements to yellow?

1. all {background-color : yellow;}


2. p {background-color : #yellow;}
3. p {background-color : yellow;}
4. all p {background-color : #yellow;}

Answer: p {background-color : yellow;}


6. Which of the following property is used as the shorthand property for the padding
properties?

1. padding-right
2. padding-left
3. padding
4. All of the above

Answer: padding

7. How to select the elements with the class name "example"?

1. example
2. #example
3. Class example
4. .example

Answer: .example

8. The CSS property used to make the text bold is___________

1. weight: bold
2. font-weight : bold
3. style: bold
4. font: bold

Answer: font-weight : bold

9. The property in CSS used to change the background color of an element


is_____________

1. background-color
2. color
3. bgcolor
4. None

Answer: background-color

10. Which of the following syntax is correct in CSS to make each word of a sentence
start with a capital letter?

1. transform : capitalize;
2. text-style : capital;
3. text-transform : capital;
4. text-transform : capitalize;

Answer: text-transform: capitalize ;

11. CSS stands for _________


1. Color and style sheets
2. Cascading style sheet
3. Cascade style sheets
4. None

Answer: Cascading style sheet

12. Which of the following is the correct syntax for referring the external style sheet?

1. <style src = "example.css" >


2. <style src = example.css>
3. <stylesheet> example.css </stylesheet>
4. <link rel="stylesheet" type="text/css" href="example.css">

Answer: <link rel="stylesheet" type="text/css" href="example.css">

13. The CSS property used to specify whether the text is written in the horizontal or
vertical direction?

1. text-indent
2. writing-mode
3. word-break
4. None

Answer: writing-mode

14. Which of the following is the correct syntax to select all paragraph elements in a div
element?

1. p
2. div p
3. div#p
4. div ~p

Answer: div p

15. Which of the following CSS property is used to add shadows to the text?

1. text-stroke
2. text-decoration
3. text-shadow
4. text-overflow

Answer: text-shadow

16. Which of the following CSS property is used to specify whether the table cells share
the common or separate border?

1. border-radius
2. border-collapse
3. border-spacing
4. None

Answer: border-collapse

17. The HTML attribute used to define the inline styles is___________

1. class
2. styles
3. style
4. None of the above

Answer: style

18. The CSS property used to draw a line around the elements outside the border?

1. line
2. border
3. padding
4. outline

Answer: outline

19. Which of the following is the correct syntax to select the p siblings of a div element?

1. p
2. div p
3. div + p
4. div ~ p

Answer: div ~p

20. Which of the following is used to specify the subscript of text using CSS?

1. vertical-align: super
2. vertical-align: sub
3. vertical-align: subscript
4. None

Answer: vertical-align : sub

21. Which of the following CSS property is used to specify the space between every
letter inside an element?

1. character-spacing
2. alpha-spacing
3. letter-spacing
4. alphabet-spacing

Answer: letter-spacing
22. Which of the following is not a value of the font-variant property in CSS?

1. small-caps
2. large-caps
3. normal
4. inherit

Answer: large-caps

23. The CSS property used to make the rounded borders, or rounded corners around
an element is________

1. border-radius
2. border-collapse
3. border-spacing
4. None

Answer: border-radius

24. The CSS property used to specify the transparency of an element is____________

1. visibility
2. filter
3. opacity
4. overlay

Answer: opacity

25. Which of the following CSS property defines how an image or video fits into
container with established height and width?

1. object-positionue
2. object-fit
3. position
4. None

Answer: object-fit

26. Which of the following property is used as the shorthand property of margin
properties?

1. margin-right
2. margin-left
3. margin
4. None of the above

Answer: margin

27. The CSS property used to set the distance between the borders of the adjacent cells
in the table is__________
1. border-collapse
2. border-spacing
3. border-radius
4. None

Answer: border-spacing

28. Which of the following is not a type of combinator?

1. ~
2. >
3. +
4. *

Answer: *

29. Which of the following selector in CSS is used to select the elements that do not
match the selectors?

1. :not selector
2. :empty selector
3. :! selector
4. None

Answer: :not selector

30. Are the negative values allowed in padding property?

1. No
2. Yes
3. Can't say
4. May be

Answer: No

You might also like