bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/CSS/Modern Layout
CSS•Modern Layout

CSS Grid Items - Order

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind CSS Grid Items - Order?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

.___ {order: 3;} .item2 {order: 6;} .item3 {order: 1;} .item4 {order: 2;} .item5 {order: 4;} .item6 {order: 5;}
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The first grid item in the HTML source code does not have to appear as the first item in the grid container.
The CSS order property can be used to define the visual order of the grid items.
Set the Visual Order of the Grid Items

Set the Visual Order of the Grid Items

The CSS order property can be used to define the visual order of the grid items.

The first grid item in the HTML source code does not have to appear as the first item in the grid container.

Example

Formatted code
.item1 {order: 3;} .item2 {order: 6;} .item3 {order: 1;} .item4 {order: 2;} .item5 {order: 4;} .item6 {order: 5;}

Live preview

Expected output

1 2 3 4 5 6

Accessibility note: The order property provides visual reordering, but it does not change the logical order of elements in the DOM. This will affect users navigating the site with assistive technologies like screen readers, as the content will be read in a different order than it is visually presented.

Previous

CSS Grid Items - Alignment

Next

CSS 12-Column Grid Layout