HTML & CSS

HTML & CSS

University

20 Qs

quiz-placeholder

Similar activities

MIDTERM EXAM - IT APP

MIDTERM EXAM - IT APP

University

17 Qs

DreamWeaver CS6

DreamWeaver CS6

University

20 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

WINDOWS 2 ՊԱՏՈՒՀԱՆՆԵՐ

WINDOWS 2 ՊԱՏՈՒՀԱՆՆԵՐ

University

18 Qs

Python Quiz For Starters

Python Quiz For Starters

3rd Grade - Professional Development

17 Qs

Multimedia Video & Animation

Multimedia Video & Animation

University

20 Qs

Django-quiz

Django-quiz

5th Grade - University

20 Qs

Excel_Test_bài 1

Excel_Test_bài 1

University

15 Qs

HTML & CSS

HTML & CSS

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Phanideep Phanideep

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given the following HTML and CSS, what will be the result of applying the CSS?

     HTML:

           <div class="container">

  <p class="text">Text</p>

</div>

CSS:

      .container {

  display: grid;

  grid-template-columns: 1fr 2fr;

  grid-template-rows: 1fr 2fr;

        }

.text {

  grid-column: 2;

  grid-row: 1 / 3;

       }

a) The paragraph will span the entire height of the grid but only in the second column.

b) The paragraph will be positioned in the first row and second column.

c) The paragraph will occupy the first column and span both rows.

d) The paragraph will be placed in the second column and span two rows

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Given the following CSS, which rule will affect the :nth-of-type selector?
CSS:

     ul li:nth-of-type(odd) {

  color: red;

}

a) It will select and color the odd-numbered <li> elements within any <ul> in red.

b) It will select and color the even-numbered <li> elements within any <ul> in red.

c) It will select all <li> elements in odd-numbered <ul> only.

d) It will color all <li> elements in red regardless of their position.

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the outcome of the following CSS applied to the HTML element?

Html :

<div class="box">Content</div>
CSS :

.box {
  position: relative;
  top: 20px;
  left: 30px;
}
.box::before {
  content: "Prefix";
  position: absolute;
  top: -20px;
  left: -30px;
}

a) The "Prefix" content will be positioned relative to the box, extending beyond its top and left edges.

b) The "Prefix" content will be positioned within the box, overlapping the original content.

c) The "Prefix" content will not be visible because it’s positioned outside the box's area.

d) The box will be displaced by 20px from the top and 30px from the left.

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which CSS property is used to control the stacking order of positioned elements?

a) position

b) order

c) stack-order

d) z-index

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the effect of the following CSS on the <div> element?

html

<div class="element">Text</div>

css

.element {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 200px;
}

a) The text will be stretched to fill the container and aligned at the center.

b) The text inside the <div> will be aligned to the end of the container and centered horizontally.

c)The text inside the <div> will be centered vertically and aligned to the start of the flex container.

d) The text will be centered horizontally and aligned to the end of the container.

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which CSS pseudo-class will select all <a> elements that have a visited link?

a) :link

b) :visited

c) :hover

d) :focus

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the visual result of this CSS rule on a block element?

css

.box {
  width: 100px;
  height: 100px;
  border: 5px solid red;
  box-sizing: border-box;
}

a) The element will have a total width and height of 100px, including the border.

b) The element will have a width and height of 90px due to the border.

c) The element will have an additional 10px padding inside the border.

d) The element will expand beyond 100px width and height to accommodate the 

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