HR/Admin : +91-7827547816
Sales : +91-7827547816
+91-9599109956
training@techspakes.com
Toggle navigation
Home
Training Courses
HTML
Website Development
WordPress Development
Front End Development
Graphics Designer
Linux Admin
MERN
Angular
Hybrid Mobile App
Drupal
Full Stack
React Native Developer
MVC
MEAN
SMM
SEO
SMO
Lead Generation
Web Development Training in Noida
Web Development Training in Jaipur
Web Development Training in Chandigarh
Computer Training in Satnali
Our Locations
Computer Training in Dahina
Computer Training in Mahendergarh
Computer Training in Narnaul
Computer Training in Satnali
Computer Training in Rewari
Computer Training in Kanina
Computer Training in Ateli Mandi
Computer Training in Bhiwani
Computer Training in Charkhi Dadri
Interview Questions
HTML Interview Questions
CSS Interview Questions
Bootstrap4 Interview Questions
Bootstrap5 Interview Questions
Javascript Interview Questions
IT Services
Testimonial
Our Top Placements
Contact
Top 500 CSS MCQ Interview Questions
Training
Top 500 CSS MCQ Interview Questions
Question 101:
Which of the following is a valid way to apply a CSS style to an element with the ID "header"?
A. #header { color: blue; }
B. header { color: blue; }
C. .header { color: blue; }
D. *header { color: blue; }
Question 102:
Which CSS property is used to create space between the border of an element and its content?
A. margin
B. padding
C. border-spacing
D. spacing
Question 103:
What does the display: none; style do?
A. It makes the element invisible and takes it out of the document flow.
B. It hides the element but keeps its space in the layout.
C. It makes the element visible only on hover.
D. It removes the element from the layout but allows it to be focused.
Question 104:
Which property is used to set the left margin of an element?
A. margin-left
B. left-margin
C. ml
D. margin: left;
Question 105:
Which property would you use to change the font of an element?
A. font-style
B. font-family
C. font-weight
D. text-font
Question 106:
What does the visibility: hidden; style do?
A. The element is hidden and does not take up any space.
B. The element is hidden but still takes up space.
C. The element is visible only on hover.
D. The element becomes semi-transparent.
Question 107:
Which of the following values can position property accept?
A. absolute
B. fixed
C. relative
D. All of the above
Question 108:
What is the purpose of the clear property in CSS?
A. To remove any background color.
B. To control the float of an element.
C. To prevent overlapping of elements.
D. To add spacing to an element.
Question 109:
Which CSS property would you use to change the text color?
A. font-color
B. color
C. text-color
D. text-style
Question 110:
Which value for the position property allows an element to be positioned relative to its normal position?
A. absolute
B. relative
C. fixed
D. sticky
Question 111:
What is the effect of overflow: hidden;?
A. It allows content to overflow beyond the element.
B. It hides any content that overflows the element's box.
C. It creates a scrollbar for overflowing content.
D. It expands the element to fit its content.
Question 112:
Which of the following CSS properties is used to control the text indentation?
A. text-indent
B. indent
C. text-spacing
D. padding-left
Question 113:
Which of the following is used to specify a grid layout in CSS?
A. display: flex;
B. display: grid;
C. display: box;
D. display: inline;
Question 114:
What is the purpose of the @media rule in CSS?
A. To define media types for specific elements.
B. To apply different styles based on media features.
C. To import styles from other stylesheets.
D. To define keyframes for animations.
Question 115:
Which property is used to specify how a list should be displayed?
A. list-style-type
B. list-type
C. display
D. type
Question 116:
Which CSS property is used to control the flex-grow of an element?
A. flex-grow
B. flex-shrink
C. flex-basis
D. flex
Question 117:
Which property is used to define the space between cells in a table?
A. cell-spacing
B. border-spacing
C. spacing
D. padding
Question 118:
Which CSS property is used to change the font size of an element?
A. font-style
B. font-size
C. text-size
D. size
Question 119:
What does the transform: translate(50px, 100px); do?
A. It moves the element 50px to the right and 100px down.
B. It scales the element by 50px and 100px.
C. It rotates the element by 50 degrees.
D. It skews the element by 50px and 100px.
Question 120:
Which property is used to set the spacing between the items in a flex container?
A. justify-content
B. align-items
C. item-spacing
D. gap
Question 121:
Which value of the display property would you use to make an element a block-level element?
A. inline
B. block
C. flex
D. grid
Question 122:
What is the purpose of the :hover pseudo-class?
A. It applies styles when an element is clicked.
B. It applies styles when the element is focused.
C. It applies styles when the mouse is over the element.
D. It applies styles when the element is active.
Question 123:
Which property would you use to create a smooth transition effect when changing the background color?
A. transition-property
B. transition
C. background-transition
D. transition-effect
Question 124:
How do you target all
<h1>
elements inside a
<div>
with a class of "container"?
A. div.container h1 { }
B. .container h1 { }
C. h1.container { }
D. div h1 { }
Question 125:
Which property is used to apply styles to an element when it is focused?
A.
B.
C.
D.
Question 126:
What is the default value of the list-style-type property for an unordered list?
A. circle
B. square
C. disc
D. none
Question 127:
Which property is used to set the opacity level of an element?
A. opacity
B. transparency
C. alpha
D. filter
Question 128:
Which of the following CSS properties is used to apply a filter effect?
A. filter
B. effect
C. opacity
D. transform
Question 129:
How do you change the font style of an element to italic?
A. font-style: italic;
B. font: italic;
C. text-style: italic;
D. style: italic;
Question 130:
Which CSS property is used to specify the amount of space between lines of text?
A. line-height
B. spacing
C. text-spacing
D. height
Question 131:
Which CSS property controls the text alignment?
A. text-align
B. align-text
C. text-position
D. align
Question 132:
Which of the following values for the position property is used for elements that should remain fixed in the viewport?
A. absolute
B. relative
C. fixed
D. static
Question 133:
Which property is used to change the cursor style when hovering over an element?
A. cursor
B. pointer
C. hover
D. mouse
Question 134:
What is the default value of the position property?
A. relative
B. absolute
C. fixed
D. static
Question 135:
Which CSS property is used to create a shadow effect for text?
A. text-shadow
B. shadow
C. box-shadow
D. text-effect
Question 136:
What does the float property do?
A. It positions an element relative to its container.
B. It allows elements to be positioned next to each other.
C. It creates a flexible layout.
D. It centers an element horizontally.
Question 137:
Which property is used to set the background color of an element?
A. bg-color
B. background-color
C. color
D. background
Question 138:
Which of the following CSS units is relative to the viewport width?
A. px
B. em
C. rem
D. vw
Question 139:
Which of the following is NOT a valid CSS unit?
A. em
B. pt
C. px
D. ptp
Question 140:
What is the purpose of the z-index property?
A. To change the order of elements on the page.
B. To define the stacking order of positioned elements.
C. To add shadows to elements.
D. To control the visibility of elements.
Question 141:
Which CSS property is used to set the width of an element?
A. width
B. size
C. length
D. dimension
Question 142:
How do you apply a CSS class named "highlight" to an HTML element?
A. <element class="highlight">
B. <element id="highlight">
C. <element style="highlight">
D. <element highlight>
Question 143:
Which property is used to set the background image of an element?
A. background-image
B. img-background
C. background
D. image-background
Question 144:
Which of the following CSS properties is used to apply a linear gradient background?
A. background-color
B. background-gradient
C. gradient
D. background-image
Question 145:
What does the align attribute do in CSS?
A. Aligns text within the element.
B. Controls the layout of the element.
C. Sets the position of the element.
D. It is deprecated and should not be used.
Question 146:
Which property controls the visibility of an element based on its display status?
A. visibility
B. display
C. hidden
D. none
Question 147:
What is the purpose of the @font-face rule in CSS?
A. To import external fonts.
B. To define custom fonts.
C. To apply font styles to elements.
D. To create font effects.
Question 148:
Which property is used to set the size of the border of an element?
A. border-width
B. border-size
C. border-thickness
D. border
Question 149:
How do you make a list display horizontally instead of vertically?
A. list-style: horizontal;
B. display: inline;
C. float: left;
D. display: block;
Question 150:
Which of the following is a CSS framework?
A. Bootstrap
B. jQuery
C. React
D. Angular
«
1
2
3
4
5
6
7
8
9
10
»
Showing 101-150 of 500 questions