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 151:
Which of the following is the correct way to apply a CSS style to an HTML element?
A. element { style: value; }
B. element = { style: value; }
C. element { property: value; }
D. element.style.value
Question 152:
Which CSS property is used to specify the font of an element?
A. font-family
B. font-type
C. text-font
D. font-style
Question 153:
Which CSS property controls the space between the content and the border of an element?
A. margin
B. border
C. padding
D. space
Question 154:
What is the purpose of the @import rule in CSS?
A. To import a CSS file into another CSS file
B. To import JavaScript files
C. To import HTML files
D. To import images
Question 155:
Which property is used to set the horizontal alignment of inline elements?
A. text-align
B. vertical-align
C. align
D. float
Question 156:
How can you apply a CSS style only when an element is hovered over?
A. element:hover { }
B. element:over { }
C. element:focus { }
D. element:active { }
Question 157:
What is the correct syntax for applying a CSS class to an HTML element?
A. <element class="classname">
B. <element class="classname:">
C. <element class="classname;">
D. <element class="classname();>
Question 158:
Which CSS property is used to change the color of text?
A. text-color
B. color
C. font-color
D. text-style
Question 159:
How do you make a list not display bullet points?
A. list-style: none;
B. bullet-style: none;
C. list-style-type: none;
D. display: none;
Question 160:
Which CSS property specifies the type of list-item marker?
A. list-style-type
B. list-item-type
C. marker-type
D. item-style
Question 161:
Which CSS property is used to create space between the text and the border?
A. margin
B. border
C. padding
D. space
Question 162:
What is the purpose of the float property in CSS?
A. To center elements
B. To position elements to the left or right
C. To align text
D. To hide elements
Question 163:
How do you create a CSS rule that applies to all <p> elements inside <div> elements?
A. div p { }
B. p div { }
C. div > p { }
D. div + p { }
Question 164:
Which CSS property is used to control the text size?
A. font-size
B. text-size
C. size
D. text-font-size
Question 165:
Which of the following properties controls the text decoration?
A. text-decoration
B. text-style
C. text-effect
D. decoration
Question 166:
What does the display: inline; property do?
A. It makes the element take up the full width available
B. It allows elements to sit next to each other
C. It removes the element from the flow of the document
D. It hides the element
Question 167:
Which of the following is used to apply multiple styles to an element in CSS?
A. , (comma)
B. ; (semicolon)
C. : (colon)
D. & (ampersand)
Question 168:
How do you select all <h1> elements that are direct children of a <div> element?
A. div h1 { }
B. div > h1 { }
C. h1 > div { }
D. h1 div { }
Question 169:
What does the position: absolute; property do?
A. Positions the element relative to its closest positioned ancestor
B. Positions the element relative to the viewport
C. Positions the element relative to the next element
D. Removes the element from the flow
Question 170:
Which property is used to change the background color of an element?
A. background
B. bg-color
C. background-color
D. color
Question 171:
How can you apply a style only if a specific condition is met using media queries?
A. @media screen and (condition) { }
B. @media (condition) { }
C. @condition { }
D. @screen and (media) { }
Question 172:
Which of the following CSS properties is used for text transformation?
A. text-style
B. text-transform
C. transform-text
D. text-decoration
Question 173:
What is the purpose of the visibility property in CSS?
A. To control the visibility of an element
B. To hide an element from the document flow
C. To set the opacity of an element
D. To change the size of an element
Question 174:
How do you specify that a property should apply only if an element is focused?
A. element:focus { }
B. element:active { }
C. element:hover { }
D. element:focus-visible { }
Question 175:
Which CSS property sets the font size for a heading?
A. heading-size
B. font-size
C. text-size
D. size
Question 176:
What is the correct syntax to define a CSS class?
A. .classname { }
B. class: classname { }
C. #classname { }
D. classname { }
Question 177:
How do you apply styles to elements with multiple classes in CSS?
A. .class1 .class2 { }
B. .class1,class2 { }
C. .class1.class2 { }
D. .class1&.class2 { }
Question 178:
Which property is used to change the line height in CSS?
A. line-height
B. height
C. text-height
D. spacing
Question 179:
What is the purpose of the flex property in CSS?
A. To create a flexible box layout
B. To align items vertically
C. To set margins on flex items
D. To change the size of the container
Question 180:
Which of the following is a CSS layout model?
A. Block
B. Inline
C. Flexbox
D. All of the above
Question 181:
How do you center an element using flexbox?
A. justify-content: center;
B. align-items: center;
C. text-align: center;
D. All of the above
Question 182:
Which property controls the order of flex items?
A. order
B. flex-order
C. position
D. align
Question 183:
What is the default value of the display property for a
<div>
element?
A. block
B. inline
C. inline-block
D. flex
Question 184:
What does
opacity: 0;
do to an element?
A. Makes it invisible
B. Hides it from the flow
C. Makes it transparent
D. Both A and C
Question 185:
Which CSS property is used to create a shadow effect on text?
A. text-shadow
B. shadow
C. text-effect
D. text-glow
Question 186:
Which of the following selectors would select an element with the ID of "header"?
A. .header
B. #header
C. header
D. header
Question 187:
What does the z-index property control?
A. The visibility of an element
B. The stacking order of elements
C. The font size
D. The position of elements
Question 188:
How can you create rounded corners for an element?
A. border-radius: 10px;
B. corner-radius: 10px;
C. round-corners: 10px;
D. border-style: round;
Question 189:
Which CSS property controls the space between lines of text?
A. line-height
B. height
C. spacing
D. text-space
Question 190:
Which of the following is a correct way to import a Google Font?
A. @import url('font-url');
B.
C. Both A and B
D. font-url();
Question 191:
How do you specify that a property should apply only to screens with a max width of 600px?
A. @media screen and (max-width: 600px) { }
B. @media (max-width: 600px) { }
C. @media screen (max-width: 600px) { }
D. @media max-width: 600px { }
Question 192:
Which of the following properties is used to change the cursor when hovering over an element?
A. cursor
B. mouse
C. hover-cursor
D. pointer
Question 193:
What does background-size: cover; do?
A. Scales the background image to be as large as possible
B. Scales the background image to cover the entire element
C. Keeps the background image at its original size
D. None of the above
Question 194:
Which property is used to control the layout of a grid container?
A. grid
B. display: grid;
C. layout: grid;
D. grid-layout;
Question 195:
What does the flex-direction property do?
A. Defines the direction in which flex items are placed in the flex container
B. Sets the alignment of flex items
C. Specifies the spacing between flex items
D. Changes the order of flex items
Question 196:
Which of the following values can be used with the display property?
A. block
B. inline
C. flex
D. All of the above
Question 197:
Which CSS property is used to change the font of an element?
A. font-family
B. font-style
C. text-font
D. font-type
Question 198:
What does the margin property do?
A. Creates space inside an element
B. Creates space outside an element
C. Changes the size of an element
D. None of the above
Question 199:
Which property is used to specify a background image in CSS?
A. background-image
B. image
C. background-pic
D. image-background
Question 200:
What is the purpose of the overflow property in CSS?
A. To control the visibility of overflow content
B. To create margins
C. To align text
D. To specify the background color
«
1
2
3
4
5
6
7
8
9
10
»
Showing 151-200 of 500 questions