Question 177Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 3 (4:30 PM)

What is the difference between a CSS grid and a CSS flexbox in front-end development?

  1. AA CSS grid is used for desktop websites, while a CSS flexbox is used for mobile websites.
  2. BThere is no difference between a CSS grid and a CSS flexbox.
  3. CA CSS grid is a one-dimensional layout system for arranging elements in a single line, while a CSS flexbox is a two-dimensional layout system for arranging elements in rows and columns.
  4. DA CSS grid is a two-dimensional layout system for arranging elements in rows and columns, while a CSS flexbox is a one-dimensional layout system for arranging elements in a single line.
Show answerHide answer

Correct answer: (D) A CSS grid is a two-dimensional layout system for arranging elements in rows and columns, while a CSS flexbox is a one-dimensional layout system for arranging elements in a single line.

Explanation

CSS Grid is a two-dimensional layout system (rows and columns). Flexbox is one-dimensional, arranging items along a single row or column.

From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM)

This is question 177 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 3 (4:30 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.