0
0
Bootsrapmarkup~20 mins

Basic table styling in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bootstrap Table Styling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2:00remaining
What is the visual effect of .table-striped in Bootstrap?
Look at a Bootstrap table with the .table-striped class applied. What do you see?
Bootsrap
<table class="table table-striped">
  <thead>
    <tr><th>#</th><th>Name</th></tr>
  </thead>
  <tbody>
    <tr><td>1</td><td>Alice</td></tr>
    <tr><td>2</td><td>Bob</td></tr>
    <tr><td>3</td><td>Charlie</td></tr>
  </tbody>
</table>
ARows alternate background color, making every other row shaded.
BTable borders become thicker and darker.
CText in the table becomes bold and larger.
DTable header row is hidden from view.
Attempts:
2 left
💡 Hint
Think about how alternating colors help you read rows easier.
selector
intermediate
1:30remaining
Which Bootstrap class adds borders to all table cells?
You want every cell in your Bootstrap table to have visible borders. Which class do you add?
A.table-striped
B.table-hover
C.table-responsive
D.table-bordered
Attempts:
2 left
💡 Hint
Borders mean lines around cells.
🧠 Conceptual
advanced
1:30remaining
What does the .table-hover class do in Bootstrap tables?
Consider a Bootstrap table with the .table-hover class. What happens when you move your mouse over the rows?
AThe text in the row becomes italicized on hover.
BThe entire table becomes hidden when hovered.
CThe row under the mouse pointer highlights with a background color.
DThe table header changes color when hovered.
Attempts:
2 left
💡 Hint
Hover means moving the mouse over something.
accessibility
advanced
1:30remaining
Which attribute improves accessibility for Bootstrap tables?
To help screen readers understand your table, which attribute should you add to the <table> element?
Aaria-hidden="true"
Brole="table"
Ctabindex="-1"
Dcontenteditable="true"
Attempts:
2 left
💡 Hint
Screen readers use roles to identify elements.
layout
expert
2:30remaining
How does .table-responsive affect Bootstrap tables on small screens?
You add .table-responsive around your table. What happens when viewing on a narrow mobile screen?
Bootsrap
<div class="table-responsive">
  <table class="table">
    <thead>
      <tr><th>#</th><th>Name</th><th>Age</th><th>City</th></tr>
    </thead>
    <tbody>
      <tr><td>1</td><td>Alice</td><td>30</td><td>New York</td></tr>
      <tr><td>2</td><td>Bob</td><td>25</td><td>Chicago</td></tr>
    </tbody>
  </table>
</div>
AThe table becomes horizontally scrollable, preventing content from squishing.
BThe table columns stack vertically like a list.
CThe table hides columns that don't fit on screen.
DThe table font size automatically shrinks to fit the screen.
Attempts:
2 left
💡 Hint
Think about how you can see wide tables on small phones.