0% found this document useful (0 votes)
6 views

CSS MCQ

Uploaded by

adarshyadav1529
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CSS MCQ

Uploaded by

adarshyadav1529
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

1.

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

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

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

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

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

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

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

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

1. example
2. #example
3. Class example
4. .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

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


is_____________

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

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;
11. CSS stands for _________

1. Color and style sheets


2. Cascading style sheet
3. Cascade style sheets
4. None

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">

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

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

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

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
17. The HTML attribute used to define the inline styles is___________

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

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

1. line
2. border
3. padding
4. 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

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

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
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

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

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

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

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

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
28. Which of the following is not a type of combinator?

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

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

30. Are the negative values allowed in padding property?

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

31. In css h1 can be called as

1. Tag
2. attribute
3. property
4. None of the above

32. Which of the following property sets an element’s background color?


1. bgcolor
2. background-image
3. background-color
4. bacxkground-colour
33. Marquee is a tag in HTML to
1. make scrolling text
2. make text float
3. make text move in circle
4. both a and b

34. Which of the following measurement defines a measurement as a percentage?


1. %
2. cm
3. inch
4. per

35. Select right syntax for width


a) <p style=width:100px>
b) <p style width:100px>
c) <p style=width:100px
d) <p style=width:100>

36. If we want define style for an unique element, then which css selector will we use ?

1. Tag
2. class
3. element
4. id

37. Which attribute can be added to many HTML / XHTML elements to identify them as a
member of a specific group ?

1. Tag
2. class
3. element
4. id

38. In the CSS, a class selector is a name preceded by ____

1. .
2. #
3. element
4. none of the above

39. In the CSS, a Id selector is a name preceded by

1. .
2. #
3. element
4. none of the above

40. select right code for id

1. #footer { color:#FF00FF; }
2. .footer { color:#FF00FF; }
3. footer { color:#FF00FF; }
4. None of the above

41. Which of the following CSS Property controls how an element is positioned?

1. Position
2. background
3. border
4. float

42. Which of the following CSS Property specifies the top offset of a positioned element?

1. bottom
2. left
3. top
4. right

43. Which of the following property sets the background image to scroll or not to scroll
with its associated element’s content?

1. background-scroll
2. background-transition
3. background-image
4. none of the above

44. Which of the following property defines the color of an element’s right border?

1. border-left
2. border-bottom
3. border-right
4. border

45. Which of the following property defines the space between cells in a table?

1. border-align
2. spacing
3. border
4. border-spacing

46. Which of the following property sets the size of the font?

1. font
2. font-size
3. font-color
4. none of the above

47. An external style sheet is ideal when the style is applied to

1. single page
2. multiple pages
3. both a and b
4. none of the above

48. The id selector is used to specify a style for

1. single, unique element


2. multiple, common element
3. multiple,unique element
4. single, common element

49. How many types are there in css

1. 4
2. 6
3. 3
4. 5

50. Which HTML tag is used for internal CSS?

1. <script>
2. <style>
3. <head>
4. none of the above

You might also like