Challenge - 5 Problems
Bootstrap Table Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ rendering
intermediateWhat does this Bootstrap table look like?
Given the following HTML code using Bootstrap classes, what visual style will the table have when rendered in a browser?
Bootsrap
<table class="table table-bordered"> <thead> <tr><th>Name</th><th>Age</th></tr> </thead> <tbody> <tr><td>Alice</td><td>30</td></tr> <tr><td>Bob</td><td>25</td></tr> </tbody> </table>
Attempts:
2 left
💡 Hint
The class 'table-bordered' adds borders around table cells.
✗ Incorrect
The Bootstrap class 'table-bordered' adds borders around every cell and the table itself, making the table fully bordered.
🧠 Conceptual
intermediateWhich Bootstrap class removes all borders from a table?
You want a table with no visible borders or lines between cells. Which Bootstrap class should you add to the table element?
Attempts:
2 left
💡 Hint
Look for a class name that suggests 'no borders'.
✗ Incorrect
The 'table-borderless' class removes all borders from the table cells, making the table appear borderless.
📝 Syntax
advancedIdentify the error in this Bootstrap table code
What error will this code cause when rendered in a browser?
Bootsrap
<table class="table table-borderless"> <thead> <tr><th>Name</th><th>Age</th></tr> </thead> <tbody> <tr><td>John</td><td>40</td></tr> </tbody> </table>
Attempts:
2 left
💡 Hint
Check if all HTML tags are properly closed.
✗ Incorrect
The for 'Name' is missing its closing tag , which can cause the browser to render the header incorrectly or merge cells unexpectedly.
❓ selector
advancedWhich CSS selector targets only borderless tables in Bootstrap?
You want to write custom CSS that only applies to Bootstrap tables without borders. Which selector correctly targets these tables?
Attempts:
2 left
💡 Hint
Look for the class that means borderless and select the table element.
✗ Incorrect
The selector 'table.table-borderless' targets elements with the class 'table-borderless', which are borderless tables in Bootstrap.
headers improves screen reader navigation and understanding, which is important especially when visual borders are missing.Practice1. What does the Bootstrap class table-bordered do to a table?easy Solution
Hint: Borders mean table-bordered, no borders mean table-borderless [OK]Common Mistakes:
2. Which is the correct way to make a Bootstrap table borderless? easy Solution
Hint: Use table-borderless with table class for no borders [OK]Common Mistakes:
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 Solution
Hint: Bordered means lines; borderless means no lines [OK] Common Mistakes:
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 Solution
Hint: Use full class table-borderless, not partial names [OK]Common Mistakes:
5. You want a table with borders only around the entire table but no borders between cells. Which Bootstrap classes should you use? hard Solution
Hint: Use table border for outer table border only [OK]Common Mistakes:
Recommended Ready to prove it?Pass the test and this pattern moves unknown 10 questions |
|---|
