CSS quiz questions

CSS interview questions

  • 1.

    Which CSS property controls the text size?

    1. font-size

    2. text-style

    3. text-size

    4. font-style

    Answer
  • 2.

    Which CSS property is used to change the text color of an element?

    1. fgcolor

    2. text-color

    3. color

    Answer
  • 3.

    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;}

    Answer
  • 4.

    Which property is used to change the background color?

    1. color

    2. bgcolor

    3. background-color

    Answer
  • 5.

    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

    Answer
  • 6.

    Which is the correct CSS syntax?

    1. body {color: black;}

    2. {body:color=black;}

    3. body:color=black;

    4. {body;color:black;}

    Answer
  • 7.

    Which HTML attribute is used to define inline styles?

    1. styles

    2. style

    3. font

    4. class

    Answer
  • 8.

    Which HTML tag is used to define an internal style sheet?

    1. <style>

    2. <css>

    3. <script>

    Answer
  • 9.

    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

    Answer
  • 10.

    What is the correct HTML for referring to an external style sheet?

    1. <style src="mystyle.css">

    2. <stylesheet>mystyle.css</stylesheet>

    3. <link rel="stylesheet" type="text/css" href="mystyle.css">

    Answer
  • 11.

    What does CSS stand for?

    1. Creative Style Sheets

    2. Cascading Style Sheets

    3. Colorful Style Sheets

    4. Computer Style Sheets

    Answer

© 2017 QuizBucket.org