The class small is not a valid Bootstrap class for tables. The correct class to make tables compact is table-sm.
Step 2: Verify other code parts
The table tag is properly closed, tbody is optional, and td is valid for data cells. These are not errors causing lack of compactness.
Final Answer:
The class should be table-sm, not small -> Option B
Quick Check:
Use table-sm for compact tables [OK]
Hint: Use exact class table-sm, not 'small' [OK]
Common Mistakes:
Using 'small' instead of 'table-sm'
Thinking missing tbody breaks compact style
Confusing td and th roles
5. You want a table that is small and compact but also has striped rows and hover effect. Which is the correct class combination?
hard
A. table table-small striped hover
B. table-sm table-striped table-hover
C. table table-sm table-striped table-hover
D. table compact striped hover
Solution
Step 1: Identify required Bootstrap classes
Bootstrap requires the base table class plus modifiers like table-sm for small tables, table-striped for striped rows, and table-hover for hover effect.
Step 2: Check each option for correctness
Only table table-sm table-striped table-hover includes all correct classes with proper prefixes. The other options miss the base table class or use invalid class names.
Final Answer:
table table-sm table-striped table-hover -> Option C
Quick Check:
Combine table with all needed modifiers [OK]
Hint: Always include base table class with modifiers [OK]
Common Mistakes:
Omitting the base table class
Using invalid class names like 'table-small' or 'compact'
Forgetting to add hover or striped classes properly
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.