Bird
Raised Fist0
Bootsrapmarkup~10 mins

List styles (unstyled, inline) 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 list unstyled using Bootstrap classes.

Bootsrap
<ul class="[1]">
  <li>Apple</li>
  <li>Banana</li>
  <li>Cherry</li>
</ul>
Drag options to blanks, or click blank then click option'
Alist-unstyled
Blist-group
Clist-inline
Dlist-inline-item
Attempts:
3 left
💡 Hint
Common Mistakes
Using list-inline instead of list-unstyled will not remove bullets.
Using list-group changes the list style completely.
2fill in blank
medium

Complete the code to display list items inline using Bootstrap classes.

Bootsrap
<ul class="list-inline">
  <li class="[1]">Home</li>
  <li class="list-inline-item">About</li>
  <li class="list-inline-item">Contact</li>
</ul>
Drag options to blanks, or click blank then click option'
Alist-inline-item
Blist-group-item
Clist-unstyled
Dlist-item
Attempts:
3 left
💡 Hint
Common Mistakes
Using list-group-item styles the item as a block group item.
Forgetting to add the class to each <li>.
3fill in blank
hard

Fix the error in the code to correctly display an inline list with Bootstrap.

Bootsrap
<ul class="list-inline">
  <li class="[1]">Item 1</li>
  <li class="list-inline-item">Item 2</li>
  <li class="list-inline-item">Item 3</li>
</ul>
Drag options to blanks, or click blank then click option'
Alist-group-item
Blist-inline-item
Clist-unstyled
Dinline-item
Attempts:
3 left
💡 Hint
Common Mistakes
Using list-group-item instead of list-inline-item.
Missing the list-inline-item class on some <li> elements.
4fill in blank
hard

Fill both blanks to create an unstyled inline list using Bootstrap classes.

Bootsrap
<ul class="[1]">
  <li class="[2]">First</li>
  <li class="list-inline-item">Second</li>
  <li class="list-inline-item">Third</li>
</ul>
Drag options to blanks, or click blank then click option'
Alist-inline
Blist-group
Clist-inline-item
Dlist-unstyled
Attempts:
3 left
💡 Hint
Common Mistakes
Using list-unstyled on <ul> does not make items inline.
Forgetting to add list-inline-item to <li> elements.
5fill in blank
hard

Fill all three blanks to create a Bootstrap list that is unstyled and inline.

Bootsrap
<ul class="[1] [2]">
  <li class="[3]">One</li>
  <li class="list-inline-item">Two</li>
  <li class="list-inline-item">Three</li>
</ul>
Drag options to blanks, or click blank then click option'
Alist-unstyled
Blist-inline
Clist-inline-item
Dlist-group
Attempts:
3 left
💡 Hint
Common Mistakes
Using only one class on <ul> will not achieve both effects.
Forgetting to add list-inline-item to <li>.

Practice

(1/5)
1. What does the Bootstrap class list-unstyled do to a list?
easy
A. Adds numbers before each list item
B. Displays list items horizontally
C. Removes bullets and indentation from the list
D. Changes the font color of list items

Solution

  1. Step 1: Understand the purpose of list-unstyled

    This class removes the default bullet points and indentation from vertical lists, making them plain.
  2. Step 2: Compare with other list styles

    Unlike list-inline, which arranges items horizontally, list-unstyled keeps items vertical but without bullets.
  3. Final Answer:

    Removes bullets and indentation from the list -> Option C
  4. Quick Check:

    list-unstyled = no bullets [OK]
Hint: Unstyled means no bullets or indentation [OK]
Common Mistakes:
  • Confusing list-unstyled with horizontal layout
  • Thinking it adds numbers instead of removing bullets
  • Assuming it changes colors or fonts
2. Which is the correct way to create a horizontal list using Bootstrap classes?
easy
A.
  • Item 1
  • Item 2
B.
  • Item 1
  • Item 2
C.
  • Item 1
  • Item 2
D.
  • Item 1
  • Item 2

Solution

  1. Step 1: Identify the required classes for horizontal lists

    Bootstrap requires list-inline on the <ul> and list-inline-item on each <li> to display items inline.
  2. Step 2: Check each option for correct usage

    • Item 1
    • Item 2
    correctly applies list-inline to <ul> and list-inline-item to each <li>. Others miss one or both classes.
  3. Final Answer:

    Uses both required classes correctly -> Option D
  4. Quick Check:

    Horizontal list = list-inline + list-inline-item [OK]
Hint: Use both list-inline and list-inline-item [OK]
Common Mistakes:
  • Forgetting list-inline-item on <li>
  • Applying list-inline-item to <ul> instead
  • Using only list-unstyled for horizontal layout
3. What will be the visual result of this code?
<ul class="list-inline">
  <li class="list-inline-item">Apple</li>
  <li class="list-inline-item">Banana</li>
  <li class="list-inline-item">Cherry</li>
</ul>
medium
A. A horizontal list with items side by side
B. A vertical list without bullet points
C. A vertical list with bullet points
D. A numbered list with items stacked

Solution

  1. Step 1: Analyze the classes used

    The list-inline class on <ul> and list-inline-item on <li> make the list items display horizontally.
  2. Step 2: Understand the visual effect

    Items appear side by side without bullets or numbers, forming a horizontal list.
  3. Final Answer:

    A horizontal list with items side by side -> Option A
  4. Quick Check:

    list-inline + list-inline-item = horizontal list [OK]
Hint: Inline classes make list items horizontal [OK]
Common Mistakes:
  • Expecting bullets or vertical stacking
  • Confusing with list-unstyled effect
  • Thinking it creates a numbered list
4. Identify the error in this Bootstrap list code:
<ul class="list-inline-item">
  <li>Home</li>
  <li>About</li>
</ul>
medium
A. The list-inline-item class should be on <li> elements, not <ul>
B. The list-inline-item class is correct on <ul>
C. Missing list-unstyled class on <ul>
D. The list should use list-group class instead

Solution

  1. Step 1: Check where list-inline-item should be applied

    This class must be on each <li> to make items inline, not on the <ul>.
  2. Step 2: Identify the correct class for <ul>

    The <ul> should have list-inline class to enable inline display.
  3. Final Answer:

    The list-inline-item class should be on <li> elements, not <ul> -> Option A
  4. Quick Check:

    list-inline-item belongs on <li> [OK]
Hint: Put list-inline-item on <li>, not <ul> [OK]
Common Mistakes:
  • Applying list-inline-item to <ul>
  • Forgetting list-inline on <ul>
  • Confusing with list-unstyled usage
5. You want a clean vertical list without bullets and also want the items to appear horizontally on small screens but vertically on larger screens. Which Bootstrap classes should you use?
hard
A. Use list-inline on <ul> and list-inline-item on <li> only
B. Use list-unstyled on <ul> and list-inline-item on <li> with responsive utilities
C. Use list-unstyled on <ul> only
D. Use list-inline on <ul> only

Solution

  1. Step 1: Remove bullets for a clean vertical list

    Applying list-unstyled removes bullets and indentation from the vertical list.
  2. Step 2: Make list horizontal on small screens only

    Use list-inline-item on <li> combined with responsive utilities (like d-sm-inline) to switch layout based on screen size.
  3. Step 3: Combine classes for responsive behavior

    Bootstrap does not provide a direct responsive list-inline class, so combining list-unstyled with inline items and responsive display classes achieves the goal.
  4. Final Answer:

    Use list-unstyled on <ul> and list-inline-item on <li> with responsive utilities -> Option B
  5. Quick Check:

    Combine unstyled + inline-item + responsive classes [OK]
Hint: Combine unstyled with inline-item and responsive display classes [OK]
Common Mistakes:
  • Using only list-inline without removing bullets
  • Applying inline classes without responsive utilities
  • Expecting Bootstrap to handle responsive inline lists automatically
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