
HTML & CSS

Quiz
•
Computers
•
University
•
Hard
Phanideep Phanideep
Used 1+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
16 questions
HTML

Quiz
•
University
15 questions
XML BASICS QUIZ

Quiz
•
University
20 questions
CSS Quiz

Quiz
•
University
15 questions
Web Technology

Quiz
•
University
20 questions
CSS Basic

Quiz
•
University
20 questions
WEB DESIGN QUIZ P1

Quiz
•
University
20 questions
HTML and CSS Quiz

Quiz
•
10th Grade - University
15 questions
REACTOR

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade