Skip to content
Justice Tech School

Tables

Add .table to a table. Variants include .table-striped, .table-hover, .table-bordered and .table-dark. Wrap in .table-responsive to scroll on small screens.

Example
<div class="table-responsive">
  <table class="table table-striped table-hover">
    <thead><tr><th>Name</th><th>Age</th></tr></thead>
    <tbody><tr><td>Ada</td><td>30</td></tr></tbody>
  </table>
</div>

Exercise

Zebra stripes.

table-

Quiz Test

How do you make a table scroll sideways on phones?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.