CSS Fundamentals Quiz Quiz

  1. CSS Specificity

    Which CSS selector has the highest specificity?

    1. An element selector
    2. A class selector
    3. An ID selector
    4. An attribute selector
    5. A tag selector
  2. CSS Box Model

    What property controls the space between the element's content and its border?

    1. Margin
    2. Border
    3. Padding
    4. Spacing
    5. Indent
  3. CSS Display Property

    Which display property makes an element generate a block element box, filling the entire width available?

    1. inline
    2. block
    3. inline-block
    4. none
    5. flex
  4. CSS Positioning

    What is the default value of the 'position' property in CSS?

    1. relative
    2. absolute
    3. fixed
    4. static
    5. sticky
  5. CSS Selectors

    Which selector is used to select all elements of a specific type?

    1. .element
    2. #element
    3. element
    4. *
    5. [element]
  6. CSS Cascading

    In CSS, what determines which styles are applied when multiple rules conflict?

    1. The order they are defined in the HTML
    2. The file size of the CSS document
    3. The specificity of the selectors
    4. The number of properties in the rule
    5. The rule declared first
  7. CSS Font Property

    Which CSS property is used to control the boldness of text?

    1. text-weight
    2. font-style
    3. font-size
    4. font-weight
    5. line-height
  8. CSS Colors

    Which of the following is a valid way to define a color in CSS?

    1. color: #00FF00;
    2. color: green;
    3. color: rgb(0, 255, 0);
    4. All of the above
    5. None of the above
  9. CSS Units

    Which CSS unit is relative to the font size of the root element?

    1. em
    2. rem
    3. vh
    4. vw
    5. px
  10. CSS Inheritance

    What happens to CSS properties that are not inherited by default?

    1. They are ignored
    2. They are inherited from the parent element
    3. They use the browser's default value
    4. They use a predefined 'auto' value
    5. They cause an error