Search Header Logo

Week 2 : CSS

Authored by Ibrahim Ibrahim

Computers

University

Used 1+ times

Week 2 : CSS
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 3 pts

What is the purpose of the z-index property in CSS?

To control the size of an element

To control the stacking order of elements

To change the color of an element

To set the transparency of an element

2.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Which of the following CSS properties is used to change the text color inside an element?

background-color

text-color

color

font-color

3.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What will be the result of the following CSS code?

p {

margin: 20px;

padding: 20px;

}

A paragraph with a 20px space inside the content and a 20px space outside the border.

A paragraph with a 20px space outside the content and a 20px space inside the border.

A paragraph with a 20px space inside the border but no space outside

A paragraph with only a 20px space outside the content.

4.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

Given the following CSS, which elements will be affected by the styles?

div > p {

color: blue;

}

All p elements nested inside any div element

All p elements that are direct children of a div element

All p elements

The first p element inside a div element

5.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What is the difference between position: absolute and position: fixed?

absolute positions relative to the viewport, while fixed positions relative to the nearest positioned ancestor.

absolute positions relative to its original location, while fixed stays in one place relative to the viewport.

absolute positions relative to the nearest positioned ancestor, while fixed positions relative to the viewport.

absolute is used for background images, while fixed is used for content.

6.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

If you want a flex container to display its items in a vertical column, which property would you use?

flex-direction: row;

align-items: center;

flex-direction: column;

justify-content: center;

7.

MULTIPLE CHOICE QUESTION

30 sec • 3 pts

What is the effect of the display: none; property?

It hides an element but still takes up space in the layout.

It hides an element and removes it from the layout flow.

It makes an element transparent.

It changes the element to a block-level element.

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?

Discover more resources for Computers