ProTechSolution
Home
Courses
Exercises
Quiz
Roadmaps
Experts
Login
Sign Up
Bootstrap 5 UI
Programming Concepts
HTML & CSS Masterclass
HTML
CSS
JavaScript
PHP
MySQL
Bootstrap 5
C#
CSS Certification Quiz
Test your knowledge to earn your official course certificate!
1. How do you insert a comment in a CSS file?
/* this is a comment */
// this is a comment
// this is a comment //
' this is a comment
2. What does the 'z-index' property do?
Sets the transparency
Sets the zoom level
Specifies the stack order of an element
Changes the font size
3. What does 'justify-content' do in Flexbox?
Aligns items vertically
Aligns items horizontally
Changes the width
Wraps the items
4. How do you display a border like this: The top border = 10px, the bottom border = 5px, the left border = 20px, and the right border = 1px?
border-width:10px 1px 5px 20px;
border-width:10px 20px 5px 1px;
border-width:10px 5px 20px 1px;
border-width:10px 1px 20px 5px;
5. Which CSS property controls the text size?
text-size
text-style
font-size
font-style
6. Which property allows you to hide an element but keep its space?
display: none;
visibility: hidden;
opacity: 0;
hidden: true;
7. How do you group selectors?
Separate each selector with a space
Separate each selector with a comma
Separate each selector with a plus sign
You cannot group selectors
8. How do you make each word in a text start with a capital letter?
text-transform:capitalize
text-transform:uppercase
transform:capitalize
text-style:capital
9. What is the correct CSS syntax for making all the <p> elements bold?
p {text-size:bold;}
p {font-weight:bold;}
<p style='text-size:bold;'>
p {font:bold;}
10. Which CSS property is used to change the text color of an element?
fgcolor
color
text-color
font-color
11. Which property is used to rotate an element?
rotate
transform
spin
turn
12. How do you define a CSS variable?
: red;
--color: red;
var color = red;
@color: red;
13. Which property defines the space between cells in a CSS Grid?
grid-spacing
gap
cell-gap
spacing
14. What is the correct CSS syntax to add a shadow to a box?
shadow: 10px 10px 5px grey;
box-shadow: 10px 10px 5px grey;
drop-shadow: 10px 10px 5px grey;
element-shadow: 10px;
15. Which property is used to change the list style to a square?
list-type: square;
list-style-type: square;
list: square;
list-style: square;
16. How do you make the text bold?
font:bold;
font-weight:bold;
style:bold;
text:bold;
17. How do you select an element with id 'demo'?
.demo
#demo
demo
*demo
18. How do you display hyperlinks without an underline?
a {text-decoration:none;}
a {text-decoration:no-underline;}
a {underline:none;}
a {decoration:no-underline;}
19. Which property prevents text from being selected?
user-select
text-select
no-select
select-none
20. Which property is used to change the background color?
bgcolor
background-color
color
bg-color
Submit Quiz (20 Questions)