Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

bootstrap 4
communitycreator

What are tables in Bootstrap 4?

Fouzia Bashir

Overview

A table is a symbolic representation of the data in a grid format. This combination of rows and columns makes it easy for the reader to understand the information. Bootstrap 4 Tables help designers to add colors, style, and variety to the standard tables. By using these simple classes, one can see significant changes to their original table.

Syntax

<table class="table"> Content of the Table <table>

Example

This .table class adds basic style to the table. A key feature is light padding and horizontal separators to identify rows.

  • HTML
Creating a table in Bootstrap 4

Explanation

  • Line 4: We add the Bootstrap source URL to load Bootstrap in the program.
  • Line 9: In the <table> element, we add the class= "table" attribute and define our columns and rows.
  • Lines 10–17: We use the <thead> subtag of the table element to define the table’s header.
  • Lines 18–31: We use the <tbody> subtag of the table element to define the table’s body, which includes our data.

RELATED TAGS

bootstrap 4
communitycreator
RELATED COURSES

View all Courses

Keep Exploring