R4RIN
Articles
Java 8
MCQS
CSS MCQ Quiz Hub
Css Mcq Set 1
Choose a topic to test your knowledge and improve your CSS skills
1. What is CSS?
CSS is a style sheet language
CSS is designed to separate the presentation and content, including layout, colors, and fonts
CSS is the language used to style the HTML documents
all of the mentioned
2. Who invented CSS?
Hakon Wium Lie
Sergey Brin
Rasmus Lerdorf
Brendan Eich
3. Which of the following tag is used to embed css in html page?
<css>
<!DOCTYPE html>
<script>
<style>
4. Which of the following CSS selectors are used to specify a group of elements?
tag
id
class
both class and tag
5. In CSS, what does h1 can be called as _______
Attribute
Selector
Tag
Value
6. Which of the following has introduced text, list, box, margin, border, color, and background properties?
HTML
PHP
CSS
Ajax
7. Which of the following CSS framework is used to create a responsive design?
django
rails
larawell
bootstrap
8. Which CSS selector is used to specify a rule to bind a particular unique element?
tag
id
class
both class and tag
9. In CSS, “font-size” can be called as ________
Property
Selector
Property-Name
Rule
10. Which type of HTML tag is used to define an internal style sheet?
<script>
<link>
<class>
<style>
11. Which CSS property is used to make the text bold?
text-decoration: bold
font-weight: bold
font-style: bold
text-align: bold
12. What will be the output of following CSS code snippet? h1 {color: "green";}
nothings happen
error occurs
heading becomes dark-green
heading becomes green
13. Which of the following CSS style property is used to specify an italic text?
style
font
font-style
@font-face
14. What will be the output of following CSS code snippet? h1 {color: red text-decoration: underline; font-style: italic;}
color: red, text-decoration: underline works
only font-style: italic works
color: red, text-decoration: underline and font-style: italic all works
text-decoration: underline and font-style: italic works
15. Which of the following are the CSS Extension Prefixes for Webkit?
-chrome
-web
-o-
-webkit
16. Which is the correct syntax to link an external style sheet in the HTML file?
<link rel=”stylesheet” href=”style.css” />
<link rel=”stylesheet” src=”style.css” />
<style rel=”stylesheet” src=”style.css” />
<style rel=”stylesheet” link=”style.css” />
17. Which of the following is the first CSS specification to become an official W3C Recommendation?
CSS level 2
(X)HTML CSS
CSS level 1
CSS level 2.1
18. Which of the following is the correct way to apply CSS style to a document?
Set an inline style rule using the style attribute directly on an element
Use an external style sheet, either by importing it or by linking to it
Directly embed a document-wide style in the head element of the document
all of the mentioned
19. Which of the following is not a value for the font-style property?
oblique
normal
italic
none of the mentioned
20. Which of the following function defines a linear gradient as a CSS image?
gradient()
linear-gradient()
grayscale()
image()
21. In css, “color:red” can be called as ________
Declaration
Value
Rule
Selector
22. Which CSS property can be used to set the image as a border instead of the border style?
background-image-source
background-image
border-image-source
border-image
23. Which of the following CSS property defines the different properties of all four sides of an element’s border in a single declaration?
border-collapse
border-width
padding
borders.
24. Which of the following CSS property specifies an image to use as the background of an element?
background-image
background
background-img
none of the mentioned
25. Which of the following is the correct way to apply CSS Styles?
in an external CSS file
inside an HTML element
inside the <head> section of an HTML page
all of the mentioned
26. Which of the following CSS3 property is used to tell the browser what the sizing properties should be included?
box-design
box-redesign
box-sizing
box-model
27. Which of the following CSS property sets the font size of text?
font-size
text-size
text
size
28. Which is not the property of the CSS box model?
margin
color
width
height
29. Which of the following CSS property sets the amount of spacing between letters?
line-height
letter-space
space
letter-spacing
30. Which of the following CSS property sets what kind of line decorations are added to an element, such as underlines, overlines, etc?
text-decoration
text-style
text-decoration-line
text-line
31. Which of the following CSS property specifies the look and design of an outline?
outline-style
outline-format
outline-font
none of the mentioned
32. Which of the following CSS property specifies the placement of an element in relation to floating objects?
space
clear
color
none of the mentioned
33. What will be the output of the following CSS code snippet? span { border: 1px solid red; outline: green dotted thick; }
All span elements will have a green thick border and a red outline
All span elements will have a red border and a green dotted outline
All span elements will have a outer green dotted border and an inner red border
All span elements will have an outer red border and inner green dotted border
34. Which of the following CSS property adds padding to the top of an element?
padding-top
padding-height
top
padding-left
35. Which of the following CSS property sets the shadow for a box element?
set-shadow
box-shadow
shadow
canvas-shadow
36. Which of the following CSS property is used to set the color of the text?
text-decoration
pallet
colour
color
37. Which of the following CSS Property controls how an element is positioned?
static
position
fix
set
38. Which of the following CSS selector selects the elements that are checked?
:checked
E ~ F
::after
none of the mentioned
39. Which of the following is an appropriate value for the overflow element?
scroll
hidden
auto
all of the mentioned
40. Which of the following CSS property is used to specify table borders in CSS?
table:border
table
border
none of the mentioned
41. Which of the following element is used to create a SVG rectangle?
<square>
<rectangle>
<polygon>
<rect>
42. Which of the following CSS property converts text to initial capitals, all uppercase, or all lowercase?
text-decoration
text-uppercase
text-transform
text-transform
43. Which of the following CSS property sets the opacity level for an element?
transparent
opacity
transparency
all of the mentioned
44. Which of the following strings are defined in CSS?
both single quotes and double quotes
single quotes
double quotes
none of the mentioned
45. Which of the following CSS Property sets the stacking order of positioned elements?
y-index
z-index
x-index
all of the mentioned
46. What will be the output of the following CSS code? div { border-width:5px; border-style:dotted solid double dashed; }
Box having dotted bottom outline, solid right outline, double top outline and dashed left outline
Box having dotted bottom outline, solid left outline, double top outline and dashed left outline
Box having dotted top outline, solid right outline, double bottom outline and dashed left outline
Box having dotted top outline, solid left outline, double bottom outline and dashed right outline
47. Which of the following CSS property defines the space between cells in a table?
border-spacing
border-style
border
none of the mentioned
48. ______ has introduced text, list, box, margin, border, color, and background properties.
css
html
ajax
php
49. Select the CSS property that sets the width of an element’s bottom border?
border-width
border-bottom
border-width-down
border-bottom-width
50. What will be the output of following code snippet? <style h1 {color: green;}> <h1>Hello</h1>
h1 heading becomes green
error
h1 heading disappears
nothing happens
51. The _______property is used to set the color of the text.
pallet
colour
color
text-decoration
52. Which of the following is the correct way to apply Styles?
inside an HTML element
inside the section of an HTML page
in an external CSS file
all of the mentioned
Submit