LAB 2.3 Flashcards
<p>This text is muted.</p>
<p>This text is important.</p>
<p>This text indicates success.</p>
<p>This text represents some information.</p>
<p>This text represents a warning.</p>
<p>This text represents danger.</p>
<p>Secondary text.</p>
<p>This text is dark grey.</p>
<p>Default body color (often black).</p>
<p>This text is light grey (on white
background).</p>
<p>This text is white (on white
background).</p>
Text Colors
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
Background Colors
- A basic Bootstrap 5 table has a light padding and horizontal dividers.
- The .table class adds basic styling to a table:
<table>
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Doe</td>
<td>john@example.com</td>
</tr>
<tr>
<td>Mary</td>
<td>Moe</td>
<td>mary@example.com</td>
</tr>
<tr>
<td>July</td>
<td>Dooley</td>
<td>july@example.com</td>
</tr>
</tbody>
</table>
Basic Table
- The .table-striped class adds zebra-stripes to a table
Striped Rows
- The .table-bordered class adds borders on all sides of the table and cells
Bordered Table
- Adds a hover effect (grey background color) on table rows
Hover Rows
- adds a black background to the table
Black / Dark Table
- Combine .table-dark and .table-striped to create a dark, striped table
Dark Striped Table
- The .table-hover class adds a hover effect (grey background color) on table rows
Hoverable Dark Table
- removes borders from the table
Borderless Table
- can be used to color the whole table (<table>), the table rows (<tr>) or table cells (<td>)
<table>
<thead>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<tr>
<td>Default</td>
<td>Defaultson</td>
<td>def@somemail.com</td>
</tr>
<tr>
<td>Primary</td>
<td>Joe</td>
<td>joe@example.com</td>
</tr>
<tr>
<td>Success</td>
<td>Doe</td>
<td>john@example.com</td>
</tr>
<tr>
<td>Danger</td>
<td>Moe</td>
<td>mary@example.com</td>
</tr>
<tr>
<td>Info</td>
<td>Dooley</td>
<td>july@example.com</td>
</tr>
<tr>
<td>Warning</td>
<td>Refs</td>
<td>bo@example.com</td>
</tr>
<tr>
<td>Active</td>
<td>Activeson</td>
<td>act@example.com</td>
</tr>
<tr>
<td>Secondary</td>
<td>Secondson</td>
<td>sec@example.com</td>
</tr>
<tr>
<td>Light</td>
<td>Angie</td>
<td>angie@example.com</td>
</tr>
<tr>
<td>Dark</td>
<td>Bo</td>
<td>bo@example.com</td>
</tr>
</tbody>
</table>
Contextual Classes
Blue: Indicates an important action
.table-primary
Green: Indicates a successful or positive action
.table-success
Red: Indicates a dangerous or potentially negative action
.table-danger
Light blue: Indicates a neutral informative change or action
.table-info