[Week 4 ] CSS Essentials: Box Model, Layouts, and Styling

Quiz
•
Computers
•
10th Grade
•
Medium
Curriculum Team
Used 15+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What are the four components of the CSS Box Model?
Content, Padding, Margin, Border
Content, Margin, Border, Width
Padding, Border, Height, Width
Content, Padding, Height, Margin
Answer explanation
The CSS Box Model consists of four components: Content (the actual content), Padding (space around the content), Border (surrounds the padding), and Margin (space outside the border). Thus, the correct answer is Content, Padding, Margin, Border.
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What does the Padding property do in the Box Model?
Adds space outside the border
Adds space between the content and the border
Changes the border color
Resizes the element
Answer explanation
The Padding property adds space between the content and the border of an element, creating a buffer that separates the inner content from the outer border. This is crucial for layout and design in the Box Model.
3.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which property is used to define the space outside the element?
Padding
Margin
Border
Width
Answer explanation
The margin property defines the space outside an element, creating distance between it and other elements. In contrast, padding is the space inside the element, while border surrounds the element itself.
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What does the box-sizing property do when set to border-box?
It includes padding and border in the element’s total width and height
It excludes padding and border from the element’s total width and height
It only affects the border
It changes the display property
Answer explanation
The box-sizing property set to border-box alters the box model so that the element's total width and height includes padding and border, making layout calculations easier and more intuitive.
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which of the following lengths is relative to the viewport width?
px
em
vw
rem
Answer explanation
The correct answer is 'vw' (viewport width), which is a relative unit that represents a percentage of the width of the viewport. In contrast, 'px', 'em', and 'rem' are not relative to the viewport width.
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
Which property is commonly used to center an element horizontally?
text-align: center;
margin: auto;
display: block;
float: left;
Answer explanation
The property 'margin: auto;' is commonly used to center block elements horizontally within their container. It automatically adjusts the left and right margins, effectively centering the element. Other options do not achieve horizontal centering.
7.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
How do you adjust the spacing between elements in CSS?
By changing the line-height
By using padding and margin
By altering the font size
By using text-indent
Answer explanation
The correct way to adjust spacing between elements in CSS is by using padding and margin. Padding adds space inside an element, while margin adds space outside of it, effectively controlling the distance between elements.
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
HTML Unit D Review

Quiz
•
10th - 12th Grade
20 questions
Quiz day 3 and 4

Quiz
•
9th - 12th Grade
20 questions
ICT Y10 WEEK 4

Quiz
•
10th Grade - University
26 questions
CodeHS Unit 5 Chapter Test

Quiz
•
8th - 12th Grade
20 questions
WebDesign Quiz

Quiz
•
10th Grade - University
20 questions
HTML and CSS Quizz

Quiz
•
10th Grade
20 questions
(Q3) HTML Table Quiz

Quiz
•
9th - 12th Grade
20 questions
CSS Box Model

Quiz
•
10th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade