Test your CSS Knowledge with this basic CSS quiz.

How well can you cascade? 1 min


  1. 1 What does CSS stand for?

    1. Computer Style Sheets
    2. Cascading sheet styles
    3. Cascading Style Sheets
    4. Creative Style Sheets
    Correct!
    Wrong!
  2. 2 What is the correct HTML for referring to an external style sheet?

    1. ⋖style src="mystyle.css">
    2. ⋖link rel="stylesheet" type="text/css" href="mystyle.css">
    3. ⋖stylesheet>mystyle.css⋖/stylesheet>
    Correct!
    Wrong!
  3. 3 Where in an HTML document is the correct place to refer to an external style sheet?

    1. At the end of the document
    2. In the ⋖head> section
    3. In the ⋖body> section
    Correct!
    Wrong!
  4. 4 Which HTML tag is used to define an internal style sheet?

    Advertisements
    1. ⋖css>
    2. ⋖script>
    3. ⋖style>
    Correct!
    Wrong!
  5. 5 Which HTML attribute is used to define inline styles?

    1. class
    2. style
    3. styles
    4. font
    Correct!
    Wrong!
  6. 6 Which is the correct CSS syntax?

    1. body {color: black;}
    2. body:color=black;
    3. {body;color:black;}
    4. {body:color=black;}
    Correct!
    Wrong!
  7. 7 How do you insert a comment in a CSS file?

    1. // this is a comment
    2. ' this is a comment
    3. // this is a comment //
    4. /* this is a comment */
    Correct!
    Wrong!
  8. 8 Which property is used to change the background color?

    Advertisements
    1. background-color
    2. bgcolor
    3. color
    Correct!
    Wrong!
  9. 9 How do you add a background color for all ⋖h1> elements?

    1. h1.all {background-color:#FFFFFF;}
    2. all.h1 {background-color:#FFFFFF;}
    3. h1 {background-color:#FFFFFF;}
    Correct!
    Wrong!
  10. 10 Which CSS property is used to change the text color of an element?

    1. text-color
    2. text-align
    3. color
    Correct!
    Wrong!
  11. 11 Which CSS property controls the text size?

    1. font-style
    2. text-style
    3. font-size
    4. text-size
    Correct!
    Wrong!
  12. 12 What is the correct CSS syntax for making all the ⋖p> elements bold?

    Advertisements
    1. ⋖p style="font-size:bold;">
    2. p {text-size:bold;}
    3. p {font-weight:bold;}
    4. ⋖p style="text-size:bold;">
    Correct!
    Wrong!
  13. 13 How do you display hyperlinks without an underline?

    1. a {text-decoration:no-underline;}
    2. a {decoration:no-underline;}
    3. a {text-decoration:none;}
    4. a {underline:none;}
    Correct!
    Wrong!
  14. 14 How do you make each word in a text start with a capital letter?

    1. text-transform:capitalize
    2. You can't do that with CSS
    3. text-style:capitalize
    4. transform:capitalize
    Correct!
    Wrong!
  15. 15 Which property is used to change the font of an element?

    1. font-style
    2. font-family
    3. font-weight
    Correct!
    Wrong!
  16. 16 How do you make the text bold?

    Advertisements
    1. style:bold;
    2. font-weight:bold;
    3. font:bold;
    Correct!
    Wrong!
  17. 17 How do you display a border like this: The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1 pixel?

    1. border-width:10px 20px 5px 1px;
    2. border-width:5px 20px 10px 1px;
    3. border-width:10px 5px 20px 1px;
    4. border-width:10px 1px 5px 20px;
    Correct!
    Wrong!
  18. 18 Which property is used to change the left margin of an element?

    1. margin-left
    2. indent
    3. padding-left
    Correct!
    Wrong!
  19. 19 When using the padding property; are you allowed to use negative values?

    1. No
    2. Yes
    Correct!
    Wrong!
  20. 20 How do you make a list that lists its items with squares?

    Advertisements
    1. list-style-type: square;
    2. list-type: square;
    3. list: square;
    Correct!
    Wrong!
  21. 21 How do you select an element with id "demo"?

    1. .demo
    2. *demo
    3. demo
    4. #demo
    Correct!
    Wrong!
  22. 22 How do you select elements with class name "test"?

    1. *test
    2. .test
    3. test
    4. #test
    Correct!
    Wrong!
  23. 23 How do you select all p elements inside a div element?

    1. div + p
    2. div p
    3. div.p
    Correct!
    Wrong!
  24. 24 How do you group selectors?

    1. Separate each selector with a comma
    2. Separate each selector with a plus sign
    3. Separate each selector with a space
    Correct!
    Wrong!
  25. 25 What is the default value of the position property?

    1. static
    2. fixed
    3. absolute
    4. relative
    Correct!
    Wrong!

Test your CSS Knowledge with this basic CSS quiz.

Created on
  1. Quiz result
    You scored
    Correct!
    Share Your Result
  2. Quiz result

    OUCH

    You scored
    Correct!

    It hurts me to know that you haven't learnt your CSS very well.

    Share Your Result
  3. Quiz result

    You TRIEEED

    You scored
    Correct!

    You know some CSS but that is just not enough. Learn more CSS and watch yourself become a CASCADING AGENT

    Share Your Result
  4. Quiz result

    GOOD SCORE. JUST GOOD SCORE

    You scored
    Correct!

    You got a good score. Congrats!! but how about fixing that little mistake that stopped you from being the champion? I bet you will

    Share Your Result
  5. Quiz result

    THE CHAMPIONNNNNNN

    You scored
    Correct!

    You are the Championnn. Look around you, this confetti is falling all because of you. CONGRATULATIONS

    Share Your Result
Advertisements

Like it? Share with your friends!

Nnaji Victor

Legend

DecaDev, Full-stack developer in training, Gamer, Techie and weirdly cool. I love writing new stuffs that I just discovered and playing around on the net. Check my socials or email me.

What's Your Reaction?

Wow Wow
2
Wow
love love
4
love
hate hate
0
hate
geeky geeky
0
geeky
win win
0
win

0 Comments

Choose A Format
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Poll
Voting to make decisions or determine opinions
Story
Formatted Text with Embeds and Visuals
List
The Classic Internet Listicles
Countdown
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item

Send this to a friend