Edu
Hub
Courses
AI Tools
Leaderboard
Login/Register
AR
Abdullah Rashid
abdullah@example.com
Navigation
📚
Courses
🏆
Leaderboard
✨
AI Tools
←
CSS Basics Mastery
⏱
15:00
Quit
0 / 21 answered
0%
CSS Basics Mastery
10 questions · Medium difficulty · 00:21:00 min
🔥 In Progress
Question 1
Which CSS property is used to change the text color of an element?
font-style
color
text-color
font-color
Question 2
How do you select an element with the ID 'my-id' in CSS?
#my-id
*my-id
.my-id
my-id
Question 3
Which CSS property controls the text size of an element?
font-size
size
text-size
font-style
Question 4
What is the default value of the `display` property for a `<div>` element?
flex
inline
block
inline-block
Question 5
Which pseudo-class is used to style an element when the user hovers over it?
:focus
:visited
:hover
:active
Question 6
How do you select all `<span>` elements in CSS?
span
.span
*span
#span
Question 7
What is the CSS Box Model a combination of?
Padding, Background, Border, Content
Margin, Border, Padding, Content
Margin, Padding, Background, Size
Width, Height, Margin, Border
Question 8
Which CSS property is used to create space around an element, outside of its border?
margin
outline
border
padding
Question 9
How do you select elements with the class 'highlight' in CSS?
.highlight
#highlight
.*highlight
highlight
Question 10
Which CSS property specifies the order of elements when they overlap?
order
position
float
z-index
Question 11
What does the `font-weight` property control?
The spacing between characters
The width of the font characters
The thickness (boldness) of the font
The style of the font (e.g., italic)
Question 12
Which CSS property is used to specify the background color of an element?
color
background-color
bg-color
background
Question 13
What does `text-align: center;` do?
Centers images within the element
Centers the border of the element
Centers the entire element on the page
Centers the text within its element
Question 14
Which CSS property is used to control the layout of elements in a row or column?
float
display
position
grid
Question 15
What is the specificity of an ID selector in CSS (e.g., `#my-id`) compared to a class selector (e.g., `.my-class`)?
Class selectors have higher specificity.
Specificity depends on the browser.
They have equal specificity.
ID selectors have higher specificity.
Question 16
Which CSS property is used to add space inside an element, between the element's content and its border?
margin
content
padding
border-spacing
Question 17
What is the purpose of the `!important` rule in CSS?
To make the CSS file load faster.
To make a specific declaration override other conflicting CSS rules
To define the most important parts of the layout.
To override default browser styles
Question 18
Which CSS property is used to control the space between lines of text?
letter-spacing
text-spacing
line-height
word-spacing
Question 19
What is the correct way to comment out a block of CSS code?
<!-- This is a comment -->
/* This is a comment
// This is a comment
/* This is a comment */
Question 20
Which value of the `position` property takes the element out of the normal flow and allows it to be positioned relative to its nearest positioned ancestor?
static
fixed
absolute
relative
Question 21
What is the default unit for `font-size` in CSS if no unit is specified?
There is no default unit; it's invalid.
em
rem
px
✅ Answered:
0
⬜ Unanswered:
8
📊
20%
done
Submit Answers →