In Flexbox, which property aligns items along the main axis?
A
align-content
B
justify-content
Correct answer
C
flex-direction
D
align-items
Correct answer
B. justify-content
12 views
⚔️
Challenge a friend on Cascading Style Sheets - CSS
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
justify-content distributes items along the main axis, which is horizontal by default. align-items handles the cross axis, and flex-direction sets which axis is the main one.
Reference
Asked in: NTS, Web Developer Interviews
Doubts & discussionNot sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ Which CSS property controls the stacking order of overlapping positioned elements? Next MCQ › Which CSS unit is relative to the font size of the root (html) element?