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 201:
Which CSS property controls the text alignment in a block element?
A. text-align
B. align-text
C. text-position
D. justify
Question 202:
What is the default value of the position property in CSS?
A. relative
B. static
C. absolute
D. fixed
Question 203:
Which of the following is NOT a valid CSS unit?
A. px
B. em
C. rem
D. ds
Question 204:
How can you change the color of a link when it is clicked?
A. a { color: red; }
B. a { color: red; }
C. a { color: red; }
D. a { color: red; }
Question 205:
Which CSS property is used to change the cursor style?
A. cursor
B. mouse
C. pointer
D. hand
Question 206:
What does the display: none; property do?
A. Hides the element, but it still takes up space
B. Hides the element and removes it from the document flow
C. Makes the element transparent
D. Displays the element without any styles
Question 207:
How can you apply a style only when an element is focused?
A. element:hover { }
B. element:focus { }
C. element:active { }
D. element:visited { }
Question 208:
Which property is used to create a space between elements in a flex container?
A. justify-content
B. gap
C. margin
D. padding
Question 209:
Which of the following is a valid CSS selector for an element with the class "box"?
A. .box
B. #box
C. box
D. box
Question 210:
Which CSS property is used to apply shadows to elements?
A. shadow
B. box-shadow
C. text-shadow
D. both b and c
Question 211:
What does text-overflow: ellipsis; do?
A. Cuts off text with an ellipsis (…) when it overflows
B. Hides overflow text
C. Displays text in italics
D. None of the above
Question 212:
How can you make a block element take only the width of its content?
A. display: inline;
B. width: auto;
C. display: inline-block;
D. Both a and c
Question 213:
What does the background-repeat property do?
A. Controls how a background image is displayed
B. Changes the background color
C. Sets the background size
D. None of the above
Question 214:
Which property is used to change the transparency of an element?
A. transparency
B. opacity
C. visibility
D. clear
Question 215:
Which CSS property is used to create space between the border and the content of an element?
A. margin
B. padding
C. border-spacing
D. spacing
Question 216:
What does flex-wrap: wrap; do?
A. Forces items into a single line
B. Allows items to wrap onto multiple lines
C. Changes the direction of flex items
D. Centers flex items
Question 217:
Which property controls the text shadow effect?
A. text-shadow
B. shadow
C. font-shadow
D. text-effect
Question 218:
Which of the following is a correct way to include CSS in an HTML document?
A. <link rel="stylesheet" href="style.css">
B. <style src="style.css"></style>
C. <script src="style.css"></script>
D. <css src="style.css"></css>
Question 219:
What is the purpose of the @keyframes rule in CSS?
A. To define animations
B. To create media queries
C. To set styles for hover states
D. To define font styles
Question 220:
Which property specifies the number of columns an element should have?
A. column-count
B. columns
C. column-width
D. column-style
Question 221:
How do you select an element with the ID "main"?
A. .main
B. #main
C. main
D. main
Question 222:
Which property is used to control the visibility of an element?
A. display
B. visibility
C. opacity
D. Both b and c
Question 223:
What is the default value of the flex-direction property?
A. row
B. column
C. row-reverse
D. column-reverse
Question 224:
Which property is used to set the size of a background image?
A. background-size
B. size
C. background-image-size
D. background-dimensions
Question 225:
What is the purpose of the @media rule in CSS?
A. To define animations
B. To apply styles for different media types and conditions
C. To import stylesheets
D. To create variables
Question 226:
Which property is used to change the alignment of flex items?
A. align-items
B. justify-content
C. flex-align
D. align-flex
Question 227:
What does the margin: auto; property do?
A. Centers the element horizontally
B. Centers the element vertically
C. Sets equal margins on all sides
D. Adds no margins
Question 228:
How can you remove the default list styling in CSS?
A. list-style: none;
B. list-style-type: none;
C. Both a and b
D. None of the above
Question 229:
Which property is used to change the font weight?
A. font-weight
B. font-size
C. text-weight
D. weight
Question 230:
What does overflow: hidden; do?
A. Hides overflow content
B. Displays overflow content
C. Both a and b
D. None of the above
Question 231:
Which CSS property controls the layout of grid items?
A. grid-template-columns
B. grid-template-rows
C. grid-area
D. All of the above
Question 232:
Which property is used to create a responsive design?
A. responsive
B. width
C. media queries
D. flex
Question 233:
What does the border: 1px solid black; property do?
A. Creates a black border around an element
B. Creates a margin around an element
C. Adds padding to an element
D. None of the above
Question 234:
Which of the following is a valid CSS animation property?
A. animation-name
B. animation-duration
C. animation-timing-function
D. All of the above
Question 235:
What is the purpose of the float property in CSS?
A. To position elements to the left or right
B. To create a responsive layout
C. To create margins
D. None of the above
Question 236:
Which property controls the size of an element?
A. width
B. height
C. Both a and b
D. size
Question 237:
Which of the following is a shorthand property for margin and padding?
A. spacing
B. padding-margin
C. margin-padding
D. None of the above
Question 238:
What does the transform property do in CSS?
A. Changes the size of an element
B. Translates, rotates, scales, or skews an element
C. Changes the color of an element
D. None of the above
Question 239:
How do you create a CSS class?
A. .classname { }
B. #classname { }
C. classname { }
D. classname { }
Question 240:
What does the @import rule do in CSS?
A. Imports styles from other stylesheets
B. Creates a new CSS file
C. Combines multiple styles into one
D. None of the above
Question 241:
Which of the following is a valid CSS property for setting a background color?
A. background-color
B. color
C. bg-color
D. Both a and b
Question 242:
How do you make a responsive grid layout?
A. Using media queries
B. Using flexbox
C. Using grid layout
D. All of the above
Question 243:
Which property is used to specify a font size?
A. font-size
B. size
C. text-size
D. font-weight
Question 244:
What is the effect of opacity: 0.5; on an element?
A. The element will be fully transparent
B. The element will be semi-transparent
C. The element will be fully opaque
D. None of the above
Question 245:
Which of the following is NOT a CSS color value?
A. rgb(255, 0, 0)
B. #FF0000
C. red
D. color(255, 0, 0)
Question 246:
Which property is used to set the width of an element?
A. width
B. size
C. height
D. area
Question 247:
Which value should you use to make a background image scroll with the content?
A. background-attachment: scroll;
B. background-attachment: fixed;
C. background-attachment: inherit;
D. background-attachment: initial;
Question 248:
What does the visibility: hidden; property do?
A. Hides the element but it still takes up space
B. Removes the element from the document flow
C. Makes the element fully transparent
D. None of the above
Question 249:
How do you specify multiple background images in CSS?
A. background: image1, image2;
B. background-image: url(image1), url(image2);
C. Both a and b
D. None of the above
Question 250:
Which property is used to change the text color?
A. text-color
B. color
C. font-color
D. Both b and c
«
1
2
3
4
5
6
7
8
9
20
»
Showing 201-250 of 500 questions