CSS is a vital technology for web styling. It controls the appearance and layout of HTML elements. Widely used in web development, CSS enables visually appealing designs and responsive layouts, with options for colors, fonts, spacing, and animations.
Last updated on:- 7th June 2023
1.
What CSS property is used to create a 3D effect by adding depth to an element ?
perspective
transform
backface-visibility
transform-style
The 'perspective' property is used to create a 3D effect by adding depth to an element in CSS.
2.
In CSS, how do you specify the order of displaying stacked elements ?
z-index
position
display
order
The 'order' property is used to specify the order of displaying stacked elements in CSS Flexbox and CSS Grid layouts.
3.
Which CSS property is used to create a background image that scrolls slower than the page content ?
background-image
background-attachment
background-size
background-position
The 'background-attachment' property is used to create a background image that scrolls slower than the page content in CSS.
4.
Which CSS property is used to specify the space between characters in a text ?
letter-spacing
word-spacing
text-spacing
character-spacing
The 'letter-spacing' property is used to specify the space between characters in a text in CSS.
5.
Which CSS property is used to create a flexible box layout ?
flex-direction
flex-wrap
flex-flow
display
The 'display' property is used to create a flexible box layout using CSS Flexbox.
6.
Which CSS property is used to animate an element's opacity ?
opacity
visibility
display
transform
The 'opacity' property is used to animate an element's opacity in CSS.
7.
Which CSS property is used to create a sticky positioning for an element ?
position
top
left
sticky
The 'position' property is used to create a sticky positioning for an element in CSS using the value 'sticky'.
8.
Which CSS property is used to set the shape of a CSS Grid item ?
grid-template-columns
grid-template-rows
grid-template-areas
grid-column
The 'grid-column' property is used to set the shape of a CSS Grid item by defining the start and end positions of the item within the grid.
9.
Which CSS property is used to create a smooth scrolling effect ?
scroll-behavior
overflow
scroll-snap-type
smooth-scrolling
The 'scroll-behavior' property is used to create a smooth scrolling effect in CSS.
10.
Which CSS property is used to create a repeating pattern from an image ?
background-repeat
background-clip
background-size
background-origin
The 'background-repeat' property is used to create a repeating pattern from an image in CSS.
11.
Which CSS property is used to create a circular shape for an element ?
border-radius
border-style
border-width
border-shape
The 'border-radius' property is used to create a circular shape for an element in CSS.
12.
Which CSS property is used to create a responsive layout for mobile devices ?
media-queries
responsive-layout
viewport
device-width
Media queries are used to create a responsive layout for mobile devices in CSS.
13.
Which CSS property is used to create an underline below text ?
text-decoration
text-underline
text-underline-style
text-decoration-line
The 'text-decoration' property is used to create an underline below text in CSS.
14.
Which CSS property is used to create a slide-in animation for an element ?
animation
transition
transform
keyframes
The 'animation' property is used to create a slide-in animation for an element in CSS.
15.
Which CSS property is used to create a fixed positioning for an element ?
position
top
left
fixed
The 'position' property is used to create a fixed positioning for an element in CSS using the value 'fixed'.
16.
Which CSS property is used to create a responsive font size based on the viewport size ?
font-size
em
rem
vw
The 'rem' (root em) unit is used to create a responsive font size based on the root element's font size in CSS.
17.
Which CSS property is used to create a fixed ratio between the width and height of an element ?
aspect-ratio
width
height
padding
The 'aspect-ratio' property is used to create a fixed ratio between the width and height of an element in CSS.
18.
Which CSS property is used to create a gradient background ?
background-color
background-image
background-gradient
background-linear-gradient
The 'background-image' property is used to create a gradient background in CSS using the 'linear-gradient' function.
19.
Which CSS property is used to create a smooth scrolling effect with snap points ?
scroll-snap-type
overflow
scroll-behavior
scroll-snap-points
The 'scroll-snap-type' property is used to create a smooth scrolling effect with snap points in CSS.
20.
Which CSS property is used to create a responsive layout for print media ?
media-queries
print-layout
print-styles
print-media
Media queries are used to create a responsive layout for print media in CSS.
21.
Which CSS property is used to create a sticky header that remains fixed at the top of the page ?
position
top
left
sticky
The 'position' property is used to create a sticky header that remains fixed at the top of the page in CSS using the value 'sticky'.
22.
Which CSS property is used to create a text shadow effect ?
text-shadow
box-shadow
shadow
text-effect
The 'text-shadow' property is used to create a text shadow effect in CSS.
23.
Which CSS property is used to create a responsive layout with a fixed aspect ratio ?
aspect-ratio
width
height
padding
The 'aspect-ratio' property is used to create a responsive layout with a fixed aspect ratio in CSS.
24.
Which CSS property is used to create a stacking order for overlapping elements ?
z-index
position
display
order
The 'z-index' property is used to create a stacking order for overlapping elements in CSS.
25.
Which CSS property is used to create a grid layout with flexible column sizes ?
grid-template-columns
grid-template-rows
grid-template-areas
grid-auto-columns
The 'grid-template-columns' property is used to create a grid layout with flexible column sizes in CSS Grid.
26.
Which CSS property is used to create a smooth scrolling effect with snap points in both horizontal and vertical directions ?
scroll-snap-type
scroll-snap-direction
scroll-snap-y-x
scroll-snap-x-y
The 'scroll-snap-type' property is used to create a smooth scrolling effect with snap points in both horizontal and vertical directions in CSS.
27.
Which CSS property is used to create a responsive text layout that adjusts the number of columns based on the available space ?
columns
column-count
column-width
column-gap
The 'columns' property is used to create a responsive text layout that adjusts the number of columns based on the available space in CSS.
28.
Which CSS property is used to create a fade-in effect for an element ?
opacity
visibility
display
transition
The 'opacity' property is used to create a fade-in effect for an element in CSS.
29.
Which CSS property is used to create a grid layout with flexible row sizes ?
grid-template-rows
grid-template-columns
grid-template-areas
grid-auto-rows
The 'grid-template-rows' property is used to create a grid layout with flexible row sizes in CSS Grid.
30.
Which CSS property is used to create a responsive text layout that adjusts the number of columns and their widths based on the available space ?
columns
column-count
column-width
column-gap
The 'columns' property is used to create a responsive text layout that adjusts the number of columns and their widths based on the available space in CSS.