🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: CSS Basics: all 10 questions

Quiz: CSS Basics · Question 9 of 10

What does margin: 12px auto; do to a block element with a fixed width?

What does margin: 12px auto; do to a block element with a fixed width?

  1. A.Adds 12px padding inside it
  2. B.Adds 12px top and bottom margin and centres it horizontally
  3. C.Makes it full width
  4. D.Hides it
Answer & explanation

Correct answer: Adds 12px top and bottom margin and centres it horizontally

Automatic left and right margins share the free space equally.

Can you get the rest right without peeking?

Take the timed Quiz: CSS Basics quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →