Test Your Knowledge - CSS Basics Quiz

By Srijan 11 August, 2018
css basics quiz
Image from Pixabay

Test Your CSS Knowledge

This quiz has 12 multiple choice questions. Only one answer is correct for all questions. If you want to brush up your basics before taking the quiz, you can read the below articles:

  • What is CSS and how to use it
  • CSS Selectors - Simple CSS Selectors in detail
  • CSS Basics Quiz


    1. CSS is used for __________ .

    • describing the structure of Web pages
    • describing the presentation of Web pages
    • making Web Pages interactive
    • sending data to server

    2. Which is a valid property for changing text color ?

    • font-color
    • color
    • text-color
    • None of the above

    3. CSS is a ___________.

    • Programming Language
    • Scripting Language
    • Markup Language
    • Stylesheet Language

    4. Which tag is used to link external stylesheets ?

    • <link>
    • <a>
    • <style>
    • <meta>

    5. Which ruleset will be applied to all HTML elements ?

    • body { color: blue;}
    • * { color: blue;}
    • div { color: blue;}
    • .container { color: blue;}

    6. Which tag is used to define internal stylesheet ?

    • <link>
    • <a>
    • <style>
    • <meta>

    7. Which CSS property is used to change text size ?

    • font-size
    • text-size
    • font-family
    • None of the above

    8. Which attribute is used to define inline styles?

    • styles
    • font
    • style
    • target

    9. Which is a valid CSS Declaration ?

    • color = 'blue'
    • color : blue
    • 'color' : 'blue'
    • 'color' = 'blue'

    10. External Stylesheets are defined in file with ________ extension.

    • .css
    • .js
    • .design
    • None of the above

    11. Which attribute value should be unique in whole document to avoid unpredictable behavior ?

    • id
    • class
    • style
    • data-*

    12. How a comment is written in CSS ?

    • ~ This is a valid comment ~
    • # This is a valid comment
    • // This is a valid comment
    • /* This is a valid comment */

    ***

    Hope this quiz helped you revise the basics of CSS. More awesome quizzes are coming soon. Follow us on our social channel to receive updates.




    Follow us on
    Sponsored