Search Header Logo

CSS Padding, Margins, and Borders Quiz

Authored by Keith Lavigne

Computers

9th Grade

CSS Padding, Margins, and Borders Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of padding in CSS?

To create space around an element's content, inside of any defined borders.

To create space between the element's border and the surrounding elements.

To define the width of an element.

To change the background color of an element.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which CSS property is used to set the space between the content and the border of an element?

margin

padding

border-spacing

border

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Noah is designing a webpage and wants to set a margin of 10 pixels on all sides of a container element. How can he achieve this?

margin: 10px;

padding: 10px;

border: 10px;

margin: 10px 0;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Hannah is designing a website and wants to add a border to a box. Which of the following is a correct way to set a border in CSS?

border: 1px solid black;

border: solid black 1px;

border: black 1px solid;

border: 1px black solid;

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the CSS property 'margin' do?

It sets the space around the content inside the border.

It sets the space outside the border of an element.

It sets the width of the border.

It sets the color of the border.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Choose the correct CSS to set a top margin of 20px.

margin-top: 20px;

padding-top: 20px;

border-top: 20px;

margin: 20px top;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Isla is designing a webpage and wants to create space between different sections of her content. Which CSS property should she use?

padding

margin

border

spacing

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?