CSS Advanced Topics Quiz

Last Updated :
Discuss
Comments

Question 1

Which selector has the highest specificity?

  • div

  • .class

  • #id

  • *

Question 2

What happens when two rules have the same specificity?

  • First one applies

  • Last one applies

  • Both merge equally

  • Browser ignores both

Question 3

How do you declare a CSS variable?

  • $color: red;

  • var-color: red;

  • --color: red;

  • color-var: red;

Question 4

How do you use a CSS variable?

  • use(color)

  • var(--color)

  • get(--color)

  • variable(color)

Question 5

Which property is inherited by default?

  • margin

  • border

  • padding

  • color

Question 6

What does inherit value do?

  • Copies value from parent

  • Removes property

  • Sets default value

  • Ignores property

Question 7

Which function rotates an element?

  • move()

  • rotate()

  • spin()

  • turn()

Question 8

What does scale(2) do?

  • Doubles size

  • Rotates element

  • Moves element

  • Shrinks element

Question 9

Which property defines the duration of a transition?

  • transition-time

  • transition-delay

  • animation-duration

  • transition-duration

Question 10

What triggers a transition?

  • Page load

  • Property change

  • Animation rule

  • JavaScript only

Tags:

There are 15 questions to complete.

Take a part in the ongoing discussion