/* Assume the grid container has 4 columns and 4 rows */ .grid-item { /* Your code here */ }
The grid-column-start and grid-row-start properties specify the starting grid lines for the item placement. Setting grid-column-start: 2 and grid-row-start: 3 places the item at the second column and third row.
Option A uses shorthand but only with single values, which is valid but less explicit. Option A is more precise and correct for this placement.
Options C and D specify wrong lines, so the item would be placed elsewhere.
.grid-container { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); gap: 10px; } .grid-item { grid-column: 2 / 4; grid-row: 1 / 3; background-color: lightblue; }
The grid-column: 2 / 4 means the item starts at column line 2 and ends before column line 4, so it covers columns 2 and 3.
The grid-row: 1 / 3 means it covers rows 1 and 2.
So the item is a box spanning columns 2 and 3 horizontally and rows 1 and 2 vertically, with a light blue background.
grid-column: 5 / 7;?.grid-container { display: grid; grid-template-columns: repeat(4, 1fr); } .grid-item { grid-column: 5 / 7; }
If a grid item references grid lines beyond the explicit grid defined by grid-template-columns, the browser automatically creates implicit grid tracks to place the item.
For a 4-column grid (grid lines 1 through 5), grid-column: 5 / 7; starts at existing line 5 and extends to line 7, creating two implicit columns.
Option B is incorrect because line 5 exists and implicit tracks are created for line 7.
Options C and D do not reflect browser behavior.
Keyboard users navigate content in the order it appears in the HTML source.
If CSS grid changes visual order, the source order should still match the logical reading order.
Using ARIA roles or properties can help define reading order if source order cannot be changed.
Options A, B, and C harm accessibility by confusing keyboard users or disabling navigation.
.grid-item { grid-area: 2 / 3 / 4 / 5; }
The grid-area shorthand uses the order: row-start / column-start / row-end / column-end.
So 2 / 3 / 4 / 5 means the item starts at row line 2 and column line 3, and ends before row line 4 and column line 5.
This covers 2 rows (lines 2 to 4) and 2 columns (lines 3 to 5).
Option D reverses row and column order, which is incorrect.
Option D treats it as a named area string, which is invalid syntax here.
Option D is wrong because the syntax is valid.