Day 3 in Bootstrap - Coding Ranjith



Typography


Typography

Bootstrap 5 provides a wide range of typography classes that allow you to easily style and format text in your web pages. These classes can be applied to various HTML elements such as headings, paragraphs, links, lists, and more. Here are some commonly used typography classes in Bootstrap 5

  1. Text Styling Classes
    • text-primary, text-secondary, text-success, text-danger, text-warning, text-info, text-light, text-dark: These classes set the color of the text to predefined Bootstrap color themes.
  2. Text Alignment Classes
    • text-start, text-center, text-end : These classes align the text to the start, center, or end of the container, respectively.
  3. Font Size Classes:
    • fs-1, fs-2, fs-3, fs-4, fs-5, fs-6 : These classes set the font size of the text to predefined values.
  4. Font Weight Classes:
    • fw-normal, fw-bold : These classes set the font weight of the text to normal or bold, respectively.
  5. Font Style Classes:
    • fst-italic: This class sets the text to italic style.
  6. Text Color Classes
    • text-[color]: These classes set the color of the text to a specific color. Replace [color] with the desired color, such as text-primary, text-secondary, text-danger, etc.
  7. Text Transformation Classes
    • text-lowercase, text-uppercase, text-capitalize: These classes transform the text to lowercase, uppercase, or capitalize the first letter of each word, respectively.
  8. Text Overflow and Text Break Classes:
    • text-overflow-ellipsis, text-overflow-clip, text-break: These classes control the behavior of text overflow and text breaking in case of long text or limited space
  9. Word Wrap Classes:
    • word-wrap-break-word: This class enables word wrapping in case of long words that exceed the container width.

Images


Images

In Bootstrap 5.3, image components provide a convenient way to display and manipulate images within your web page. These components offer various features such as responsiveness, image optimization, alignment, sizing, captions, and overlays. Let's explore each aspect in more detail:

img-fluid


coding-ranjith

img-fluid img-thumbnail


coding-ranjith


Figures & Figcaption


Figures & Figcaption

In Bootstrap 5.3, figures are a component used to enhance the presentation of images and media content. The <figure> element, along with the <figcaption> element, is used to wrap and caption the image or media. Here's an explanation of how to use figures in Bootstrap 5.3

Structure the figure: Start by creating a <figure> element and placing the image or media content inside it.

Coding Ranjith
A caption for the above image.

<figure class="figure">: This <figure> element represents the container for the image and its caption. The "figure" class is applied to add default Bootstrap styling to the figure.

<figcaption class="figure-caption"> A caption for the above image. </figcaption> : This <figcaption> element represents the caption for the image. The "figure-caption" class is applied to style the caption text.


Tables


Tables

In Bootstrap 5.3, tables can be easily styled and made responsive using the built-in classes and components provided by Bootstrap. Here's an explanation of tables in Bootstrap 5.3:

Bootstrap Normal Table

In Bootstrap 5.3, a normal table refers to a basic table structure that can be easily styled and customized using Bootstrap's classes. Here's an explanation of how to create a normal table in Bootstrap 5.3:

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Bootstrap Table Colors

In Bootstrap 5.3, you can easily apply different colors to tables using the available utility classes. Here's an explanation of the table color options in Bootstrap 5.3

Background Color Classes: Bootstrap also provides utility classes for applying specific background colors to table rows or cells. These classes are applied to the <tr> or <td> elements. The available background color classes are:

These classes allow you to apply specific colors to table rows or cells to match your design or highlight specific information.

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Striped Table

In Bootstrap 5.3, you can easily apply different colors to tables using the available utility classes. Here's an explanation of the table color options in Bootstrap 5.3

By following these steps, you can create a striped table in Bootstrap 5.3. The striped pattern improves readability and helps users visually separate and differentiate rows in a table. Remember to include the necessary Bootstrap CSS and JavaScript files in your project to ensure that the Bootstrap styles and functionalities are properly applied to the table and other elements.

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Striped Table Columns

In Bootstrap 5.3, you can create striped tables by using the "table-striped-columns" class. A striped table alternates the background color of table columns, making it easier to read and distinguish between columns. Here's an explanation of how to create a striped table in Bootstrap 5.3

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Hover Table

In Bootstrap 5.3, you can create a hover effect on table rows using the "table-hover" class. This class adds interactivity to your table by highlighting rows when hovering over them. Here's an explanation of how to create a hover table in Bootstrap 5.3

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Active Rows

Highlight a table row or cell by adding a .table-active class.

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Bordered Table

In Bootstrap 5.3, the "table-bordered" class allows you to add borders to the cells of a table, creating a bordered appearance. Here's an explanation of how to use the "table-bordered" class in Bootstrap 5.3

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Table Bordered with Border-color

Add .table-bordered for borders on all sides of the table and cells.

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Borderless Table

In Bootstrap 5.3, you can create a borderless table by using the "table-borderless" class. This class allows you to remove the borders around the cells of a table, resulting in a clean and borderless appearance. Here's an explanation of how to create a borderless table in Bootstrap 5.3.

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Compact Table

In Bootstrap 5.3, you can create a compact table by using the "table-sm" class. This class reduces the padding and font size of the table, making it more compact and suitable for displaying larger amounts of data in a limited space. Here's an explanation of how to create a compact table in Bootstrap 5.3

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Table Group Dividers

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data

Nested Table

In Bootstrap 5.3, you can create nested tables by placing one table inside another. This technique allows you to organize and structure your data in a hierarchical manner. Here's an explanation of how to create nested tables in Bootstrap 5.3

Heading Heading
Data Data
Data
Heading Heading
Data Data
Data Data

Table With Footer

In Bootstrap 5.3, you can create a table with a footer section to display additional information or summary data. The footer section appears below the table body and can be used to provide context or aggregate data. Here's an explanation of how to create a table with a footer in Bootstrap 5.3

Heading Heading Heading Heading Heading
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Data Data Data Data Data
Footer Data Footer Data Footer Data Footer Data Footer Data

Responsive Table

In Bootstrap 5.3, you can create responsive tables that adapt to different screen sizes using the "table-responsive" class. This class ensures that the table remains horizontally scrollable on smaller screens, preventing it from overflowing the container and maintaining readability. Here's an explanation of how to create a responsive table in Bootstrap 5.3.

Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading Heading
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data
Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data Data

--- Happy Coding ---