Bird
Raised Fist0
Bootsrapmarkup~10 mins

Column ordering in Bootsrap - Interactive Code Practice

Choose your learning style10 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to make the second column appear first on medium screens.

Bootsrap
<div class="row">
  <div class="col-md-6">First column</div>
  <div class="col-md-6 [1]">Second column</div>
</div>
Drag options to blanks, or click blank then click option'
Aorder-md-2
Border-md-0
Corder-md-first
Dorder-md-3
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'order-md-0' which does not make the second column appear first.
Using 'order-md-2' which places the column after the first.
2fill in blank
medium

Complete the code to make the first column appear last on large screens.

Bootsrap
<div class="row">
  <div class="col-lg-4 [1]">First column</div>
  <div class="col-lg-8">Second column</div>
</div>
Drag options to blanks, or click blank then click option'
Aorder-lg-last
Border-lg-12
Corder-lg-2
Dorder-lg-0
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'order-lg-12' which is not a valid Bootstrap order class.
Using 'order-lg-0' which does not change the order.
3fill in blank
hard

Fix the error in the code to correctly reorder columns on small screens.

Bootsrap
<div class="row">
  <div class="col-sm-6 [1]">Left column</div>
  <div class="col-sm-6">Right column</div>
</div>
Drag options to blanks, or click blank then click option'
Aorder-sm-3
Border-sm-1
Corder-sm-0
Dorder-sm-first
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'order-sm-0' which does not reorder the column.
Using 'order-sm-3' which places the column last but may not be intended.
4fill in blank
hard

Fill both blanks to reorder columns: make the first column second and the second column first on extra large screens.

Bootsrap
<div class="row">
  <div class="col-xl-6 [1]">First column</div>
  <div class="col-xl-6 [2]">Second column</div>
</div>
Drag options to blanks, or click blank then click option'
Aorder-xl-2
Border-xl-1
Corder-xl-0
Dorder-xl-last
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'order-xl-last' which places a column last but does not swap order.
Using the same order number for both columns.
5fill in blank
hard

Fill all three blanks to create a row with three columns where the middle column appears first, the last column second, and the first column last on large screens.

Bootsrap
<div class="row">
  <div class="col-lg-4 [1]">First</div>
  <div class="col-lg-4 [2]">Second</div>
  <div class="col-lg-4 [3]">Third</div>
</div>
Drag options to blanks, or click blank then click option'
Aorder-lg-3
Border-lg-1
Corder-lg-2
Dorder-lg-last
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'order-lg-last' which always places a column last, not second.
Assigning the same order number to multiple columns.

Practice

(1/5)
1. What does Bootstrap's .order-* class do in a grid layout?
easy
A. It adds padding inside columns.
B. It changes the visual order of columns without altering the HTML structure.
C. It hides columns on smaller screens.
D. It changes the background color of columns.

Solution

  1. Step 1: Understand the purpose of .order-* classes

    Bootstrap's .order-* classes let you rearrange columns visually without changing their HTML order.
  2. Step 2: Compare with other options

    The other options describe unrelated styling or behavior, not column ordering.
  3. Final Answer:

    It changes the visual order of columns without altering the HTML structure. -> Option B
  4. Quick Check:

    Column ordering = Visual reorder without HTML change [OK]
Hint: Remember: .order-* changes visual order, not HTML order [OK]
Common Mistakes:
  • Thinking .order-* changes HTML structure
  • Confusing order with visibility or color
  • Assuming it affects padding or margins
2. Which of the following is the correct syntax to make a column appear first using Bootstrap classes?
easy
A. class="col order-last"
B. class="col order-1"
C. class="col order-0"
D. class="col order-first"

Solution

  1. Step 1: Recall Bootstrap order classes

    Bootstrap provides order-first to place a column first, order-last to place last, and numeric order-* from 0 to 12 for custom order.
  2. Step 2: Analyze each option

    class="col order-1" uses order-1 which is not guaranteed first. class="col order-first" uses order-first which explicitly places the column first. class="col order-0" uses order-0 which is valid but less clear than order-first. class="col order-last" places the column last.
  3. Final Answer:

    class="col order-first" -> Option D
  4. Quick Check:

    Use order-first to place column first [OK]
Hint: Use order-first to make a column appear first easily [OK]
Common Mistakes:
  • Using order-0 instead of order-first
  • Confusing order-last with order-first
  • Using invalid order numbers like order-13
3. Given this HTML snippet:
<div class="row">
  <div class="col order-3">A</div>
  <div class="col order-1">B</div>
  <div class="col order-2">C</div>
</div>

What is the visual order of columns on the page?
medium
A. B, C, A
B. A, B, C
C. C, B, A
D. B, A, C

Solution

  1. Step 1: Understand order numbers

    Lower order numbers appear first visually. Here, B has order-1, C order-2, A order-3.
  2. Step 2: Arrange columns by order

    Order from smallest to largest: B (1), C (2), A (3).
  3. Final Answer:

    B, C, A -> Option A
  4. Quick Check:

    Order numbers ascending = B, C, A [OK]
Hint: Lower order-* number means earlier visual position [OK]
Common Mistakes:
  • Assuming HTML order is visual order
  • Mixing up order numbers and column content
  • Ignoring that order-1 is before order-2
4. You want the second column to appear first on small screens but keep original order on larger screens. Which class should you add?
medium
A. order-lg-first
B. order-first
C. order-sm-first
D. order-last

Solution

  1. Step 1: Understand responsive order classes

    Bootstrap uses breakpoint prefixes like sm, md, lg to apply order changes at specific screen sizes.
  2. Step 2: Match requirement to class

    To reorder only on small screens, use order-sm-first. order-first applies to all sizes. order-lg-first applies on large screens. order-last places last always.
  3. Final Answer:

    order-sm-first -> Option C
  4. Quick Check:

    Use order-sm-first for small screen reorder [OK]
Hint: Use order-sm-first to reorder only on small screens [OK]
Common Mistakes:
  • Using order-first which affects all sizes
  • Using order-lg-first which affects large screens
  • Confusing order-last with order-first
5. You have three columns with classes:
<div class="col order-2 order-md-1">First</div>
<div class="col order-1 order-md-2">Second</div>
<div class="col order-3">Third</div>

How will the columns appear on small and medium screens respectively?
hard
A. Small: Second, First, Third; Medium: First, Second, Third
B. Small: First, Second, Third; Medium: Second, First, Third
C. Small: First, Second, Third; Medium: First, Second, Third
D. Small: Second, Third, First; Medium: First, Second, Third

Solution

  1. Step 1: Analyze small screen order

    On small screens, order-* without breakpoint applies. So orders are: First=2, Second=1, Third=3. Visual order: Second (1), First (2), Third (3).
  2. Step 2: Analyze medium screen order

    On medium screens, order-md-* overrides. First=1, Second=2, Third=3. Visual order: First, Second, Third.
  3. Final Answer:

    Small: Second, First, Third; Medium: First, Second, Third -> Option A
  4. Quick Check:

    Breakpoint order overrides default order [OK]
Hint: Breakpoint-specific order overrides default order [OK]
Common Mistakes:
  • Ignoring breakpoint-specific order classes
  • Assuming order-md-* applies on small screens
  • Mixing up order numbers and visual positions
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard