WorksheetsIntroduction to CSS Quiz
Total questions: 60
Worksheet time: 30mins
CSS stands for:
Cascading Style Sheets
Creative Style Sheets
Colorful Style Sheets
Computer Style Sheets
CSS was first developed in:
1995
1996
1997
1998
CSS1 was introduced in:
1995
1996
1997
1998
CSS2 was published in:
1997
1998
1999
2000
Which CSS version introduced rounded corners, background decoration, and box shadows?
CSS1
CSS2
CSS2.1
CSS3
A CSS declaration must always end with:
Comma
Colon
Semicolon
Period
In CSS, which of the following is a valid comment?
// This is a comment
/* This is a comment */
# This is a comment
The selector id is defined with a:
.
#
@
$
Which of the following selectors is used for a single, unique element?
Class
Tag
Id
Universal
The CSS class selector is defined with a:
.
#
@
$
How many ways can you insert CSS into a web page?
1
2
3
4
Internal styles are defined in which section of an HTML page?
Body
Head
Footer
Header
Inline styles are applied:
In the head section
In an external CSS file
Within an HTML element
In the footer section
Which property is used to specify the background color of an element?
color
background
background-color
background-image
Which property is used to set an image as the background?
background-color
background-image
background-repeat
background-position
By default, the background image is repeated:
Horizontally
Vertically
Both horizontally and vertically
No repeat
Which property is used to set the color of text?
text-color
color
font-color
background-color
The text-align property can align text to:
Left
Right
Center
All of the above
Which property removes the underline from hyperlinks?
text-decoration
text-decoration
text-underline
none of the above
Which value of the text-transform property converts text to uppercase?
lowercase
capitalize
uppercase
none of the above
Which property is used to set the indent of the first line of text?
text-indent
text-align
text-transform
text-decoration
Which property is used to change the font family of text?
font-family
font-style
font-size
font-weight
The property to set italic text is:
font-family
font-style
font-size
font-weight
Which unit is a relative size for fonts recommended by W3C?
px
pt
em
cm
Which property is used to set the space between the element border and the element content?
margin
padding
border
outline
Which property is used to set the space outside the border of an element?
margin
padding
border
outline
Which property is used to set the style of an element's border?
border-color
border-style
border-width
border-padding
The shorthand property for margin can be specified as:
margin: top right bottom left;
margin: left right top bottom;
margin: top left right bottom;
margin: bottom left top right;
Which CSS property is used to set the width of an element?
height
width
size
dimension
Which property in CSS3 is used to add rounded borders to elements?
border-radius
border-style
border-color
border-width
Which property is used to apply shadow to text in CSS3?
box-shadow
text-shadow
shadow
font-shadow
Which CSS3 property attaches one or more drop shadows to an element's box?
box-shadow
text-shadow
shadow
eleme
Which CSS3 property attaches one or more drop shadows to an element's box?
box-shadow
text-shadow
shadow
element-shadow
Which CSS3 property is used to define the size of a background image?
background-size
background-width
background-height
background-dimension
The background-repeat property can have which of the following values?
repeat
repeat-x
repeat-y
All of the above
Which property is used to specify the position of the background image?
background-position
background-align
background-set
background-move
The background-attachment property can have which of the following values?
scroll
fixed
local
Both A and B
The background-size property can have which of the following values?
auto
cover
contain
All of the above
The CSS box-sizing property can have which of the following values?
content-box
padding-box
border-box
All of the above
Which property is used to add space between the border and the content in a box?
margin
padding
space
gap
Which property is used to define the color of the border?
border-color
border-style
border-width
border-color
Which property is used to specify the width of the border?
border-size
border-width
border-length
border-thickness
The position property can have which of the following values?
static
relative
absolute
All of the above
Which value of the position property places an element in its normal position in the document flow?
static
relative
absolute
fixed
Which value of the position property positions an element relative to its normal position?
static
relative
absolute
fixed
Which value of the position property positions an element relative to its first positioned (not static) ancestor element?
static
relative
absolute
fixed
The float property is used for:
Moving elements to the left or right
Applying shadow effects
Adding rounded corners
Allowing text to wrap around an image
Which property is used to prevent an element from floating next to a floated element?
clear
float-clear
no-float
float-stop
The clear property can have which of the following values?
none
left
right
All of the above
Which value of the clear property clears floats from both sides?
both
none
left
right
Flexbox layout is designed for:
One-dimensional layout
Two-dimensional layout
Three-dimensional layout
None of the above
Which property is used to define the direction of the flex container's main axis?
flex-direction
flex-wrap
flex-flow
flex-order
Which property is used to define whether the flex items should wrap or not?
flex-direction
flex-wrap
flex-flow
flex-order
The align-items property aligns flex items:
Along the main axis
Along the cross axis
In both axes
None of the above
Grid layout is designed for:
One-dimensional layout
Two-dimensional layout
Three-dimensional layout
None of the above
Which property is used to define the number of columns in a grid layout?
grid-columns
grid-template-columns
column-template
grid-columns-template
Which property is used to define the size of rows and columns in a grid layout?
grid-size
grid-template
grid-gap
grid-row/column
The grid-gap property is used to specify:
The space between rows only
The space between columns only
The space between rows and columns
The space within rows and columns
Which CSS property is used to apply a transition effect to an element?
transition
animate
transform
transition-effect
The transition-property property specifies:
The name of the property to transition
The duration of the transition effect
The timing function of the transition effect
The delay before the transition starts
