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
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>.
Step 2: Identify the correct class for <ul>
The <ul> should have list-inline class to enable inline display.
Final Answer:
The list-inline-item class should be on <li> elements, not <ul> -> Option A
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
Step 1: Remove bullets for a clean vertical list
Applying list-unstyled removes bullets and indentation from the vertical list.
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.
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.
Final Answer:
Use list-unstyled on <ul> and list-inline-item on <li> with responsive utilities -> Option B