Search Header Logo

CSS Alignment Quiz

Authored by Arbresha Ajrula

Other

5th Grade

Used 2+ times

CSS Alignment Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What property is used to center a block element horizontally?

margin: auto;

text-align: center;

float: left;

position: relative;

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which property is used to center text inside an element?

text-align: center;

margin: auto;

float: right;

display: block;

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What should be set to prevent a block element from stretching to the edges?

Width property

Height property

Padding property

Margin property

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

How do you center an image using CSS?

Set left and right margin to auto

Use text-align: center;

Use position: absolute;

Set display to inline-block

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which property can be used to center elements vertically using padding?

Position property

Margin property

Padding property

Display property

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the purpose of the line-height property in centering?

To float elements

To set margins

To change font size

To vertically center text

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the effect of using position: absolute?

Removes the element from normal flow

Centers the element

Floats the element to the left

Changes the display type

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?