CSS quiz questions

CSS interview questions

  • 1.

    In CSS,select the property used to set the background color of an image?

    1. background-color

    2. color

    3. None

    4. color:background

    5. background:color

    Answer
  • 2.

    In CSS, Select the property to set an image in a list instead of a standard bullet?

    1. image-list:

    2. list-image:

    3. None

    4. list-style-image:

    5. list-image-src:

    Answer
  • 3.

    In CSS, what is the correct option to select only the paragraphs with class name “warning”?
    <p class=”warning”>Don’t do it.</p>
    <p>Do it.</p>
    <p class=”warning”>Nooo, don’t do it.</p>

    1. .warning { }

    2. #warning { }

    3. warning { }

    4. p { }

    5. None

    Answer
  • 4.

    Select the property that is used to create spacing between HTML elements?

    1. spacing

    2. margin

    3. padding

    4. border

    5. None

    Answer
  • 5.

    Select the property that is used to change the list style to show roman numerals instead of normal numbers?

    1. list-style-type:upper-roman;

    2. list-bullet-type:roman-numerals;

    3. list-style:roman;

    4. list-type:roman;

    5. None

    Answer
  • 6.

    In CSS, what is the correct option to select all the tags on a page?

    1. #p { }

    2. p { }

    3. .p { }

    4. <p> { }

    5. None

    Answer
  • 7.

    In CSS, Select the appropriate option to style an element so that the next element would appear right next to it not underneath it if both elements widths were collectively smaller than the container element?

    1. display:inline;

    2. display:left;

    3. display:horizontal;

    4. None

    Answer
  • 8.

    In CSS, choose the correct option to select this image by its id?

    <img id=”mainpic” src=”cat.png”>

    1. .mainpic { }

    2. img { }

    3. None

    4. mainpic { }

    5. #mainpic { }

    Answer
  • 9.

    Select the property used to create space between the element’s border and inner content?

    1. padding

    2. spacing

    3. None

    4. margin

    5. border

    Answer
  • 10.

    In CSS,Select the property used to set the spacing in between lines of text?

    1. line-height

    2. line-spacing

    3. letter-spacing

    4. spacing

    5. None

    Answer
  • 11.

    For users that use the tab key to navigate websites, what property represents this way of moving from one element to another?

    1. a:focus

    2. a:active

    3. None

    4. a:link

    5. a:visited

    Answer
  • 12.

    Which of the following property specifies the distance between a marker and the text in the list?

    1. marker-offset

    2. list-style-position

    3. list-style-image

    4. list-style

    Answer
  • 13.

    Which of the following property specifies whether a border should be solid, dashed line, double line, or one of the other possible values?

    1. :border-color

    2. :border-style

    3. :border-width

    4. :border-bottom-color

    Answer
  • 14.

    Which of the following property is used to set the width of an image?

    1. border

    2. height

    3. width

    4. -moz-opacity

    Answer
  • 15.

    Which of the following property is used to add or subtract space between the letters that make up a word?

    1. color

    2. direction

    3. letter-spacing

    4. word-spacing

    Answer
  • 16.

    Which of the following property is used as a shorthand to specify a number of other background properties?

    1. background-attachment

    2. background

    3. background-repeat

    4. background-position

    Answer
  • 17.

    Which of the following uses 1vw or 1vh, whichever is smaller?

    1. px

    2. vh

    3. vw

    4. vmin

    Answer
  • 18.

    Which of the following is a true about CSS style overriding?

    1. Any inline style sheet takes highest priority. So, it will override any rule defined in tags or rules defined in any external style sheet file.

    2. Any rule defined in tags will override rules defined in any external style sheet file.

    3. Any rule defined in external style sheet file takes lowest priority, and rules defined in this file will be applied only when above two rules are not applicable.

    4. All of the above.

    Answer
  • 19.

    Which of the following property changes the color of left border?

    1. :border-top-color

    2. :border-left-color

    3. :border-right-color

    4. :border-bottom-color

    Answer
  • 20.

    Which of the following property changes the color of bottom border?

    1. :border-color

    2. :border-style

    3. :border-width

    4. :border-bottom-color

    Answer

© 2017 QuizBucket.org