HTML & CSS Assessment Quiz

Time Remaining:
25:00

Student Information

Question 1: Concept Understanding

Which CSS property determines how elements behave when they don't fit in their container?

Question 2: Concept Understanding

What is the correct definition of CSS specificity?

Question 3: Concept Understanding

In the CSS box model, which of the following is applied FIRST to the element's content?

Question 4: Concept Understanding

Which HTML5 semantic element would be MOST appropriate for the main content area of a webpage?

Question 5: Concept Understanding

In a CSS flexbox layout, what does `flex: 1 0 auto` mean?

Question 6: Concept Understanding

What is the primary purpose of CSS Grid's `grid-template-areas` property?

Question 7: Code Analysis

What's wrong with this CSS code?

.container {
  display: flex;
  flex-direction: horizontal;
  align-items: center;
}

Question 8: Code Analysis

What issue exists in this HTML code?

<article>
  <h2>Article Title</h2>
  <p>First paragraph</p>
  <h1>Section Heading</h1>
  <p>Second paragraph</p>
</article>

Question 9: Code Analysis

What would be the computed value of `width` for this element?

.box {
  width: 100px;
  min-width: 150px;
  max-width: 200px;
}

Question 10: Code Analysis

What's problematic about this CSS media query?

@media screen and (max-width: 600px) and (min-width: 800px) {
  .container {
    width: 90%;
  }
}

Question 11: Code Analysis

What problem exists in this CSS?

.responsive-image {
  max-width: 100%;
  max-height: auto;
  display: block;
}

Question 12: Predict Output

How would these elements be arranged in the browser?

<div style="display: flex; flex-direction: column-reverse; height: 300px;">
  <div style="height: 100px; background: red;">A</div>
  <div style="height: 100px; background: blue;">B</div>
  <div style="height: 100px; background: green;">C</div>
</div>

Question 13: Predict Output

What will be displayed for an element with this CSS applied?

.element {
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background-color: blue;
  transform: translate(50%, 50%) rotate(45deg);
}

Question 14: Predict Output

What would this CSS produce on the webpage?

.grid-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-gap: 10px;
  height: 200px;
}

Question 15: Predict Output

What will be the result of this HTML and CSS?

<div class="parent">
  <div class="child">Content</div>
</div>
.parent {
  position: relative;
  height: 200px;
  background: yellow;
}
.child {
  position: absolute;
  bottom: 0;
  right: 0;
  background: red;
  padding: 10px;
}

Question 16: Predict Output

What will this CSS selector match?

article > p:first-of-type

Question 17: Predict Output

How would this layout behave on a narrow mobile screen?

.container {
  display: flex;
  flex-wrap: nowrap;
}
.box {
  flex: 0 0 200px;
}

Question 18: Predict Output

What would happen with this CSS if applied to a paragraph containing the text "This is important!"?

p::first-letter {
  font-size: 2em;
  float: left;
  padding: 4px;
  background-color: red;
}

Question 19: Predict Output

What would this HTML and CSS render as?

<ul class="nav">
  <li>Home</li>
  <li>About</li>
  <li>Contact</li>
</ul>
.nav {
  display: flex;
  list-style: none;
  padding: 0;
}
.nav li {
  margin-right: 10px;
}
li:hover {
  text-decoration: underline;
  cursor: pointer;
}

Quiz Results

Your score: 0/19