Bird
Raised Fist0
Bootsrapmarkup~10 mins

Bordered and borderless tables 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 add a border to the table using Bootstrap classes.

Bootsrap
<table class="table [1]">
  <thead>
    <tr>
      <th>Header 1</th>
      <th>Header 2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Data 1</td>
      <td>Data 2</td>
    </tr>
  </tbody>
</table>
Drag options to blanks, or click blank then click option'
Atable-striped
Btable-hover
Ctable-bordered
Dtable-sm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table-striped' which adds stripes, not borders.
Using 'table-hover' which adds hover effect, not borders.
2fill in blank
medium

Complete the code to create a borderless table using Bootstrap classes.

Bootsrap
<table class="table [1]">
  <thead>
    <tr>
      <th>Item</th>
      <th>Price</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Apple</td>
      <td>$1</td>
    </tr>
  </tbody>
</table>
Drag options to blanks, or click blank then click option'
Atable-borderless
Btable-striped
Ctable-bordered
Dtable-hover
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table-bordered' which adds borders instead of removing them.
Using 'table-striped' which adds stripes, not related to borders.
3fill in blank
hard

Fix the error in the code to correctly apply a borderless style to the table.

Bootsrap
<table class="table [1]">
  <thead>
    <tr>
      <th>Name</th>
      <th>Age</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>John</td>
      <td>30</td>
    </tr>
  </tbody>
</table>
Drag options to blanks, or click blank then click option'
Aborderless-table
Bborderless
Ctable-border
Dtable-borderless
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'borderless-table' which is not a Bootstrap class.
Using 'borderless' which is incomplete and invalid.
4fill in blank
hard

Fill both blanks to create a striped, bordered table.

Bootsrap
<table class="table [1] [2]">
  <thead>
    <tr>
      <th>Product</th>
      <th>Quantity</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Bananas</td>
      <td>5</td>
    </tr>
  </tbody>
</table>
Drag options to blanks, or click blank then click option'
Atable-striped
Btable-hover
Ctable-bordered
Dtable-sm
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table-hover' instead of 'table-striped'.
Using 'table-sm' which changes size, not borders or stripes.
5fill in blank
hard

Fill all three blanks to create a small, borderless, hoverable table.

Bootsrap
<table class="table [1] [2] [3]">
  <thead>
    <tr>
      <th>City</th>
      <th>Country</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Paris</td>
      <td>France</td>
    </tr>
  </tbody>
</table>
Drag options to blanks, or click blank then click option'
Atable-sm
Btable-hover
Ctable-borderless
Dtable-striped
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table-bordered' instead of 'table-borderless'.
Using 'table-striped' which adds stripes, not hover effect.

Practice

(1/5)
1. What does the Bootstrap class table-bordered do to a table?
easy
A. Changes the table background color
B. Removes all borders from the table
C. Adds borders around all table cells
D. Makes the table text bold

Solution

  1. Step 1: Understand the purpose of table-bordered

    This class adds visible borders around each cell in the table to separate data clearly.
  2. Step 2: Compare with other classes

    Unlike table-borderless which removes borders, table-bordered adds them for clarity.
  3. Final Answer:

    Adds borders around all table cells -> Option C
  4. Quick Check:

    table-bordered means borders added [OK]
Hint: Borders mean table-bordered, no borders mean table-borderless [OK]
Common Mistakes:
  • Confusing table-bordered with background color changes
  • Thinking it removes borders instead of adding
  • Assuming it changes text style
2. Which is the correct way to make a Bootstrap table borderless?
easy
A. <table class='table table-borderless'>
B. <table class='borderless-table'>
C. <table class='table borderless'>
D. <table class='table table-bordered'>

Solution

  1. Step 1: Recall Bootstrap borderless table class

    The correct class to remove borders is table-borderless used alongside table.
  2. Step 2: Check syntax correctness

    <table class='table table-borderless'> uses class='table table-borderless', which is the proper Bootstrap syntax.
  3. Final Answer:

    <table class='table table-borderless'> -> Option A
  4. Quick Check:

    Borderless table uses table-borderless [OK]
Hint: Use table-borderless with table class for no borders [OK]
Common Mistakes:
  • Using only borderless without table
  • Confusing table-bordered with borderless
  • Misspelling the class name
3. What will be the visual difference between these two tables?

<table class='table table-bordered'>...</table>
and
<table class='table table-borderless'>...</table>
medium
A. The first table has borders; the second has no borders
B. Both tables will have thick borders around cells
C. Both tables will have no borders
D. The second table will have colored borders

Solution

  1. Step 1: Understand table-bordered effect

    This class adds visible borders around all table cells.
  2. Step 2: Understand table-borderless effect

    This class removes all borders, making the table look clean without lines.
  3. Final Answer:

    The first table has borders; the second has no borders -> Option A
  4. Quick Check:

    Bordered vs borderless means borders vs no borders [OK]
Hint: Bordered means lines; borderless means no lines [OK]
Common Mistakes:
  • Assuming borderless still shows borders
  • Thinking both tables look the same
  • Confusing border color with border presence
4. You wrote this code but the table still shows borders:
<table class='table borderless'>
  <tr><td>Data</td></tr>
</table>

What is the error?
medium
A. Table tag is missing closing tag
B. Missing table-borderless class; used borderless instead
C. You need to add table-bordered to remove borders
D. The tr tag is incorrect

Solution

  1. Step 1: Check class names for borderless table

    The correct class to remove borders is table-borderless, not just borderless.
  2. Step 2: Verify HTML structure

    The table tag is properly closed and tr is correct, so no errors there.
  3. Final Answer:

    Missing table-borderless class; used borderless instead -> Option B
  4. Quick Check:

    Use exact Bootstrap class table-borderless [OK]
Hint: Use full class table-borderless, not partial names [OK]
Common Mistakes:
  • Using incomplete or wrong class names
  • Confusing table-bordered with borderless
  • Ignoring proper closing tags
5. You want a table with borders only around the entire table but no borders between cells. Which Bootstrap classes should you use?
hard
A. table table-bordered
B. table table-borderless
C. border border-1
D. table border

Solution

  1. Step 1: Understand Bootstrap border classes

    table-bordered adds borders around all cells, not just the table.
  2. Step 2: Use border on table only

    Bootstrap's border class adds border around the element itself. Combined with table, it provides table styling with border only around the table and no cell borders.
  3. Step 3: Why other options fail

    Options B and D add or remove all cell borders. border border-1 adds border but lacks table styling. table border is correct.
  4. Final Answer:

    table border -> Option D
  5. Quick Check:

    Border on table only needs table border [OK]
Hint: Use table border for outer table border only [OK]
Common Mistakes:
  • Assuming table-bordered only borders table edges
  • Omitting the table class and using only border utilities
  • Confusing cell borders with table border
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