LAB 2.3 Flashcards

1
Q

<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>

A

Text Colors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

<div></div>

<div></div>

<div></div>

<div></div>

<div></div>

<div></div>

<div></div>

<div></div>

A

Background Colors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • 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>

A

Basic Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • The .table-striped class adds zebra-stripes to a table
A

Striped Rows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • The .table-bordered class adds borders on all sides of the table and cells
A

Bordered Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
  • Adds a hover effect (grey background color) on table rows
A

Hover Rows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • adds a black background to the table
A

Black / Dark Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  • Combine .table-dark and .table-striped to create a dark, striped table
A

Dark Striped Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
  • The .table-hover class adds a hover effect (grey background color) on table rows
A

Hoverable Dark Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • removes borders from the table
A

Borderless Table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
  • 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>

A

Contextual Classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Blue: Indicates an important action

A

.table-primary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Green: Indicates a successful or positive action

A

.table-success

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Red: Indicates a dangerous or potentially negative action

A

.table-danger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Light blue: Indicates a neutral informative change or action

A

.table-info

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Orange: Indicates a warning that might need attention

A

.table-warning

17
Q

Grey: Applies the hover color to the table row or table cell

A

.table-active

18
Q

Grey: Indicates a slightly less important action

A

.table-secondary

19
Q

Light grey table or table row background

A

.table-light

20
Q

Dark grey table or table row background

A

.table-dark

21
Q
  • You can also use any of the contextual classes to only add a background color to the table header
A

Table Head Colors

22
Q

The .table-sm class makes the table smaller by cutting cell padding in half

A

Small table

23
Q

The .table-responsive class adds a scrollbar to the table when needed (when it is too big horizontally)

A

Responsive Tables

24
Q

< 576px

A

.table-responsive-sm < 576px

25
< 768px
.table-responsive-md
26
< 992px
.table-responsive-lg
27
< 1200px
.table-responsive-xl
28
< 1400px
.table-responsive-xxl
29
- The .rounded class adds rounded corners to an image: Cinque Terre
Rounded Corners
30
- the .rounded-circle class shapes the image to a circle Cinque
Terre
Circle
31
- The .img-thumbnail class shapes the image to a thumbnail (bordered) Cinque
Terre
Thumbnail
32
- float an image to the left with the .float-start class or to the right with .float-end
Aligning Images
33
- Center an image by adding the utility classes .mx-auto (margin:auto) and .d-block (display:block) to the image: -
Centered Image
34
- Images come in all sizes. So do screens. automatically adjust to fit the size of the screen. - Create responsive images by adding an .img-fluid class to the tag. The image will then scale nicely to the parent element. - The .img-fluid class applies max-width: 100%; and height: auto; to the image: New York
Responsive Images
35
- was introduced in Bootstrap 3 as a big padded box for calling extra attention to some special content or information. - are no longer supported in Bootstrap 5. However, you can use a
element and add special helper classes together with a color class to achieve the same effect

Jumbotron Example

Lorem ipsum...

Jumbotron
36
Bootstrap 5 provides an easy way to create predefined alert messages
Success! Indicates a successful or positive action.
Alerts
37
Add the .alert-link class to any links inside the alert box to create "matching colored links"
Success! You should read this message.
Alert Links