
HTML & CSS
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Phanideep Phanideep
Used 2+ times
FREE Resource
Enhance your content in a minute
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

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
After Effect Intoduction
Quiz
•
10th Grade - University
18 questions
Memory-Mobo-Hard/Software
Quiz
•
University
16 questions
Digital Icons
Quiz
•
12th Grade - University
20 questions
PARC Linux Basic Part 2
Quiz
•
University
20 questions
CSS Pseudo dan CSS Grid System
Quiz
•
University
18 questions
SQL Quiz
Quiz
•
University
20 questions
Google SketchUp Tool
Quiz
•
KG - University
20 questions
1ºDAM/DAW - Entornos de Desarrollo - UD1-6 - Prof. C. Boni
Quiz
•
University - Professi...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
