CSS Advanced Topics Quiz

Last Updated :
Discuss
Comments

Question 1

Which selector has the highest specificity?

  • A

    div

  • B

    .class

  • C

    #id

  • D

    *

Question 2

What happens when two rules have the same specificity?

  • A

    First one applies

  • B

    Last one applies

  • C

    Both merge equally

  • D

    Browser ignores both

Question 3

How do you declare a CSS variable?

  • A

    $color: red;

  • B

    var-color: red;

  • C

    --color: red;

  • D

    color-var: red;

Question 4

How do you use a CSS variable?

  • A

    use(color)

  • B

    var(--color)

  • C

    get(--color)

  • D

    variable(color)

Question 5

Which property is inherited by default?

  • A

    margin

  • B

    border

  • C

    padding

  • D

    color

Question 6

What does inherit value do?

  • A

    Copies value from parent

  • B

    Removes property

  • C

    Sets default value

  • D

    Ignores property

Question 7

Which function rotates an element?

  • A

    move()

  • B

    rotate()

  • C

    spin()

  • D

    turn()

Question 8

What does scale(2) do?

  • A

    Doubles size

  • B

    Rotates element

  • C

    Moves element

  • D

    Shrinks element

Question 9

Which property defines the duration of a transition?

  • A

    transition-time

  • B

    transition-delay

  • C

    animation-duration

  • D

    transition-duration

Question 10

What triggers a transition?

  • A

    Page load

  • B

    Property change

  • C

    Animation rule

  • D

    JavaScript only

Tags:

There are 15 questions to complete.

Take a part in the ongoing discussion