Test your knowledge now with our Online Quizzes, Q&A and MCQs! CSS Quick Study Episode- 12. Take part in an interactive quiz experience with our online quizzes, Q&A and MCQs. Try it out now Online Quiz, Q&A & MCQ.
1. How can we change the background color of an element?
a. background-color
b. color
c. Both A and B
d. None of these
View Answer
a. background-color
2. Which is the correct CSS syntax?
a. body: color = black;
b. body {color: black}
c. {body: color : black;}
d. {body : color = black;}
View Answer
b. body {color: black}
3. How can we select an element with a specific ID in CSS?
a. #
b. .
c. !
d. None of these
View Answer
a. #
4. How can we select an element with a specific Class in CSS?
a. #
b. .
c. !
d. None of these
View Answer
b. .
5. Can negative values be allowed in padding property?
a. Yes
b. No
c. Depends on property
d. None of these
View Answer
b. No
6. The CSS property used to specify the transparency of an element is?
a. opacity
b. visibility
c. filter
d. None of these
View Answer
a. opacity
7. How can we specify the spacing between each letter in a text in CSS?
a. alpha-spacing
b. letter-spacing
c. character-spacing
d. None of these
View Answer
b. letter-spacing
8. We can make rounded borders around element using which CSS element?
a. border-collapse
b. border-round
c. border-radius
d. None of these
View Answer
c. border-radius
9. Which of the following property specifies the look and design of an outline?
a. outline-style
b. outline
c. outline-font
d. None of these
View Answer
a. outline-style
10. Which of the following are valid CSS position property values?
a. static
b. relative
c. fixed
d. All of these
View Answer
d. All of these
11. Which of the following CSS property is used to controlling the layout?
a. display
b. color
c. text
d. None of these
View Answer
a. display
12. Which of the following CSS property specifies the origin of the background image?
a. background-origin
b. background-size
c. origin
d. None of these
View Answer
a. background-origin
13. How are custom fonts defined using CSS?
a. @font-face rule
b. Custom fonts cannot be defined
c. src tags
d. None of these
View Answer
a. @font-face rule
14. Which of the following are parts of the CSS box model?
a. Margins
b. Borders
c. Padding
d. All of these
View Answer
d. All of these
15. Which of the following components of the CSS box model are transparent?
a. Padding
b. Margin
c. Both A and B
d. Content
View Answer
c. Both A and B
16. Which of the following can be achieved with CSS lists?
a. Set different list item markers for ordered lists
b. Set different list item markers for unordered lists
c. Set an image as the list item marker
d. All of these
View Answer
d. All of these
17. Which of the following CSS property specifies the type of list item marker?
a. list
b. list-style-type
c. ul
d. ol
View Answer
b. list-style-type
18. What value should be passed to the width parameter if we want an element,say a table, to span the entire width of the screen?
a. 100%
b. 50%
c. 0%
d. None of these
View Answer
a. 100%
19. Which of the following properties is used to align text in CSS?
a. text-align
b. text-alignment
c. text
d. text-position
View Answer
a. text-align
20. Which of the following is the correct approach to make a table responsive?
a. overflow-x: auto
b. overflow-x: none
c. Both A and B
d. None of these
View Answer
a. overflow-x: auto
21. Which of the following CSS properties specifies the stack order of elements?
a. z-index
b. overlap
c. No such specific properties is present
d. None of these
View Answer
a. z-index
22. What are the uses of CSS pseudo-elements?
a. Style specified parts of an element
b. Style the first letter or line of an element
c. Insert content before or after the element
d. All of the above
View Answer
d. All of the above
23. How can we select elements with a specified attribute in CSS?
a. [attribute] selector
b. [property] selector
c. Both A and B
d. None of these
View Answer
a. [attribute] selector
24. Which of the following are types of length units in CSS?
a. Absolute
b. Relative
c. Both A and B
d. None of these
View Answer
c. Both A and B
25. What parameter does the calc() function in CSS take?
a. A sentence
b. A mathematical expression
c. A number
d. None of these
View Answer
b. A mathematical expression
26. How can we add more importance to a property/value than normal?
a. !important
b. important
c. bold
d. None of these
View Answer
a. !important
27. Which CSS property specifies the painting area of the background?
a. background-size
b. background-clip
c. background-image
d. None of these
View Answer
b. background-clip
28. What are the different types of gradients in CSS?
a. Linear Gradients
b. Conic Gradients
c. Radial Gradients
d. All of these
View Answer
d. All of these
29. Which CSS property is used to create an image reflection?
a. box-reflect
b. image-reflect
c. reflect-img
d. None of these
View Answer
a. box-reflect
30. The transparent keyword is equivalent to which RGBA() value in CSS?
a. RGBA(0, 0, 0, 1)
b. RGBA(255, 255, 255, 1)
c. RGBA(0, 0, 0, 0)
d. RGBA(255, 255, 255, 0)
View Answer
c. RGBA(0, 0, 0, 0)
31. What function is used to insert values of a CSS variable?
a. var()
b. rand()
c. varchar()
d. calc()
View Answer
a. var()
32. What is the general syntax of writing the var() function?
a. var(–name, value)
b. var(–name)
c. var(value)
d. None of these
View Answer
a. var(–name, value)
33. The CSS property used to control the element’s font size is –
a. text-style
b. text-size
c. font-size
d. None of these
View Answer
c. font-size
34. The HTML attribute used to define the internal stylesheet is –
a. <style>
b. style
c. <link>
d. <script>
View Answer
a. <style>
35. Which of the following is the correct syntax to make the background-color of all paragraph elements to yellow?
a. p {background-color : yellow;}
b. p {background-color : #yellow;}
c. all {background-color : yellow;}
d. all p {background-color : #yellow;}
View Answer
a. p {background-color : yellow;}
36. Which of the following is the correct syntax to display the hyperlinks without any under line?
a. a {text-decoration : underline;}
b. a {decoration : no-underline;}
c. a {text-decoration : none;}
d. None of these
View Answer
c. a {text-decoration : none;}
37. 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
View Answer
d. All of the mentioned
38. Which of the following tag is used to embed css in html page?
a. <css>
b. <!DOCTYPE html>
c. <script>
d. <style>
View Answer
d. <style>
39. 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
View Answer
c. class
40. Which of the following has introduced text, list, box, margin, border, color, and background properties?
a. HTML
b. PHP
c. CSS
d. Ajax
View Answer
c. CSS
41. Which of the following CSS framework is used to create a responsive design?
a. django
b. rails
c. larawell
d. bootstrap
View Answer
d. bootstrap
42. 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
View Answer
b. font-weight: bold
43. Which of the following CSS style property is used to specify an italic text?
a. style
b. font
c. font-style
d. @font-face
View Answer
c. font-style
44. Which of the following are the CSS Extension Prefixes for Webkit?
a. -chrome
b. -web
c. -o-
d. –webkit
View Answer
d. –webkit
45. Which of the following is the first CSS specification to become an official W3C Recommendation?
a. CSS level 2
b. (X)HTML CSS
c. CSS level 1
d. CSS level 2.1
View Answer
c. CSS level 1
46. Which of the following CSS property can be used to set the image as a border instead of the border style?
a. background-image-source
b. background-image
c. border-image-source
d. border-image
View Answer
c. border-image-source
47. Which of the following is the correct way to apply CSS Styles?
a. in an external CSS file
b. inside an HTML element
c. inside the <head> section of an HTML page
d. all of the mentioned
View Answer
d. all of the mentioned
48. Which of the following is not the property of the CSS box model?
a. margin
b. color
c. width
d. height
View Answer
b. color
49. What will be the output of the following CSS code snippet? span { border: 1px solid red; outline: green dotted thick; }
a. All span elements will have a green thick border and a red outline
b. All span elements will have a red border and a green dotted outline
c. All span elements will have a outer green dotted border and an inner red border
d. All span elements will have an outer red border and inner green dotted border
View Answer
c. All span elements will have a outer green dotted border and an inner red border
50. Which of the following CSS property is used to set the color of the text?
a. text-decoration
b. pallet
c. colour
d. color
View Answer
d. color
51. Which of the following CSS property is used to set the color of the text?
a. text-decoration
b. pallet
c. colour
d. color
View Answer
b. pallet
52. Which of the following is an appropriate value for the overflow element?
a. scroll
b. hidden
c. auto
d. all of the mentioned
View Answer
d. all of the mentioned
53. Which of the following CSS property is used to specify table borders in CSS?
a. table:border
b. table
c. border
d. none of the mentioned
View Answer
c. border
54. Which of the following CSS property defines the space between cells in a table?
a. border-spacing
b. border-style
c. border
d. none of the mentioned
View Answer
a. border-spacing
55. Which of the following CSS3 property can be used to allow line breaks within words?
a. line-break
b. line-wrap
c. word-wrap
d. word-break
View Answer
d. word-break
56. In CSS, h1 can be called as _______
a. Selector
b. Attribute
c. Value
d. Tag
View Answer
a. Selector
57. In css, “color:red” can be called as _____________
a. Selector
b. Rule
c. Declaration
d. Value
View Answer
c. Declaration
58. In CSS, “font-size” can be called as ________
a. Selector
b. Rule
c. Property
d. Property-Name
View Answer
d. Property-Name
59. Which one of these is NOT an appropriate value for the font-variant property?
a. small-caps
b. large-caps
c. default
d. inherit
View Answer
b. large-caps
60. Which value is a slightly bolder weight than the standard bold in the font attribute?
a. dark
b. lighter
c. light
d. emphasize
View Answer
a. dark
61. The CSS property that is equivalent to the align attribute is:
a. text-align
b. float
c. text-align & float
d. centre
View Answer
b. float
62. Which one is NOT the audio element’s attribute?
a. check
b. controls
c. loop
d. src
View Answer
a. check
63. Which property sets the actual amount of spacing between the various letters?
a. letter-spacing
b. letter-space
c. line-height
d. space
View Answer
b. letter-space
64. What is a CSS selector?
a. A CSS selector is the CSS class name
b. A CSS selector is the set of properties that are going to be applied on HTML elements
c. A CSS selector is name of CSS file
d. A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern of elements
View Answer
d. A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern of elements
65. From the given options which is/are the valid way to represent a color?
a. A valid color name like “blue”
b. HEX code like “#0000ff”
c. RGB Value like “rgb(0,0,255)
d. All of the above
View Answer
d. All of the above
66. Which property is used to define the font of the element’s text?
a. font
b. font-family
c. font-style
d. All of the above
View Answer
b. font-family
67. What are the valid values of font-style property?
a. italic, bold, bolder
b. normal, bold, italic
c. underline, bold, italic
d. inherit, italic, normal, oblique
View Answer
d. inherit, italic, normal, oblique
68. Why font-weight property is used?
a. Sets how thick or thin characters in text should be displayed.
b. Sets the size of the font
c. Both A. and B.
d. None of the above
View Answer
a. Sets how thick or thin characters in text should be displayed.
69. Which is the correct inline CSS for p tag to define paragraph’s text and background colors?
a. <p css="color: red; background-color: yellow;">
b. <p cssstyle="color: red; background-color: yellow;">
c. <p inline="color: red; background-color: yellow;">
d. <p style="color: red; background-color: yellow;">
View Answer
d. <p style="color: red; background-color: yellow;">
70. Which of the following is the correct syntax to remove the underline on hyperlinks and visited hyperlinks?
a. a {text-decoration : underline;}, a:visited {text-decoration : underline;}
b. a {text-decoration : block;}, a:visited {text-decoration : block;}
c. a {text-decoration : none;}, a:visited {text-decoration : none;}
d. None of the above
View Answer
c. a {text-decoration : none;}, a:visited {text-decoration : none;}
71. Which CSS property is used to style the hyperlinks on hover (Mouse over)?
a. a:mouseover
b. a:move
c. a:mover
d. a:hover
View Answer
d. a:hover
72. Which CSS property and value is used to center an element?
a. text-align:center
b. align:center
c. text-align:middle
d. align:middle
View Answer
a. text-align:center
73. What are the valid values of text-align property?
a. left, middle, right
b. left, center, right
c. left, center, right, justify
d. left, middle, right, justify
View Answer
c. left, center, right, justify
74. What is the use of “text-align:justify” in CSS?
a. Stretches the lines so that each line has equal width
b. Stretches the lines so that each line can be arranged in left alignment
c. Stretches the lines so that each line can be arranged in right alignment
d. None of the above
View Answer
a. Stretches the lines so that each line has equal width
75. Which CSS property is used to specify the indentation of the first line of a text?
a. text-align
b. padding-left
c. margin-left
d. text-indent
View Answer
d. text-indent
76. Which CSS property is used to specify the space between lines?
a. line-space
b. line-spacing
c. line-padding
d. line-height
View Answer
d. line-height
77. Which CSS property is used to specify uppercase and lowercase letters in a text?
a. text-transform
b. text-case
c. case
d. text-casing
View Answer
a. text-transform
78. Which is the correct CSS statement to capitalize the first letter of each word?
a. text-transform: uppercase
b. text-transform: capitalize
c. text-transform: sentence
d. Both A. and B.
View Answer
b. text-transform: capitalize
79. What are the valid values of text-transform property?
a. uppercase, lowercase, and capitalize
b. uppercase, lowercase, capitalize, and sentence
c. upper, lower, and capital
d. upper, lower, capital, and sentence
View Answer
a. uppercase, lowercase, and capitalize
80. What are the valid values of “text-decoration” property?
a. overline, line-through, underline, and none
b. overline, strike, line-through, underline, and none
c. double-line, overline, line-through, underline, and none
d. None of these
View Answer
a. overline, line-through, underline, and none
81. Which CSS property specifies how to align the last line of a text?
a. text-align
b. last-text-align
c. text-align-last-line
d. text-align-last
View Answer
d. text-align-last
82. Which CSS property sets the vertical alignment of an element?
a. vertical-align
b. vertical-text-align
c. text-valign
d. vertical-align-text
View Answer
a. vertical-align
83. Which is the correct CSS statement to define multiple font families?
a. font: “Times New Roman”, Times, serif;
b. font-name: “Times New Roman”, Times, serif;
c. font-family: “Times New Roman, Times, serif”;
d. font-family: “Times New Roman”, Times, serif;
View Answer
d. font-family: “Times New Roman”, Times, serif;
84. Which CSS property specifies the type of list item marker?
a. list-style
b. list-style-type
c. list-style-circle
d. list-style-square
View Answer
b. list-style-type
85. Which is the correct CSS statement is used to remove the markers/bullets?
a. list-style: none;
b. list-style-type: 0;
c. list-style-type: blank;
d. list-style-type: none;
View Answer
d. list-style-type: none;
86. Which CSS property specifies an image as the list item marker?
a. list-style-image
b. list-style-picture
c. list-style-background
d. list-style-bgimage
View Answer
a. list-style-image
87. Which CSS property specifies the type of positioning method used for an element?
a. positions
b. text-position
c. positioning
d. position
View Answer
d. position
88. HTML elements are positioned ___ by default.
a. static
b. fixed
c. relative
d. none
View Answer
a. static
89. What are the valid values for “position” property?
a. block, none, fixed, absolute, and static
b. block, static, fixed, absolute, and sticky
c. static, relative, fixed, absolute, and none
d. static, relative, fixed, absolute, and sticky
View Answer
d. static, relative, fixed, absolute, and sticky
90. Which CSS function uses the largest value?
a. large()
b. maximum()
c. max_value()
d. max()
View Answer
d. max()
91. Which CSS function uses the smallest value?
a. small()
b. minimum()
c. min_value()
d. min()
View Answer
d. min()
93. Can we link multiple stylesheets to a single page?
a. Yes
b. No
c. Can’t say, it depends on CSS properties
d. None of the above
View Answer
a. Yes
94. In this line of code, identify the selector ___.
p {border: 2px solid blue;}
a. p
b. border
c. 2px
d. None of these
View Answer
a. p
97. Amongst the following browsers, which browser supports almost all the CSS properties?
a. Firefox
b. Safari
c. Google Chrome
d. Opera
View Answer
c. Google Chrome
98. What is the CSS Entity for the character ‘#’?
a. 0023
b. 0026
c. 0027
d. None of the these
View Answer
a. 0023
99. Which selector selects the markers of list items?
a. :: marker
b. .marker
c. ::selector
d. None of these
View Answer
a. :: marker
100. Which is the most widely used font in customizing web pages?
a. Times New Roman
b. Georgia
c. Arial
d. Garamond
View Answer
c. Arial