Articles → BOOTSTRAP → Table Bootstrap Classes
Table Bootstrap Classes
Table Class
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bootstrap.css" />
</head>
<body style="margin:20px">
<form>
<table class="table">
<thead>
<tr>
<td>
Label
</td>
<td>
Fields
</td>
</tr>
</thead>
<tr>
<td>
User Name
</td>
<td>
<input type="text" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<input type="text" />
</td>
</tr>
<tr>
<td>
Address
</td>
<td>
<input type="text" />
</td>
</tr>
</table>
</form>
</body>
</html>
Click to Enlarge
Table-Striped Class
<table class="table table-striped">
Click to Enlarge
Table-Bordered Class
<table class="table table-bordered">
Click to Enlarge
Table-Hover Class
<table class="table table-hover">
Click to Enlarge
Contextual Classes
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<table class="table">
<tr>
<th>Header</th>
</tr>
<tr class="success">
<td>Success class</td>
</tr>
<tr class="danger">
<td>Danger class</td>
</tr>
<tr class="info">
<td>Info class</td>
</tr>
<tr class="warning">
<td>Warning class</td>
</tr>
<tr class="active">
<td>Active class</td>
</tr>
</table>
</div>
</body>
</html>
Click to Enlarge