Table markup

Tag Description
<table> Wrapping element for displaying data in a tabular format
<thead> Container element for table header rows (<tr>) to label table columns
<tbody> Container element for table rows (<tr>) in the body of the table
<tr> Container element for a set of table cells (<td> or <th>) that appears on a single row
<td> Default table cell
<th> Special table cell for column (or row, depending on scope and placement) labels
Must be used within a <thead>
<caption> Description or summary of what the table holds, especially useful for screen readers
 本港台现场报码室 www.pjxvea.cn <table>
  <thead>
    <tr>
      <th></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

Table options

Name Class Description
Default None No styles, just columns and rows
Basic .table Only horizontal lines between rows
Bordered .table-bordered Rounds corners and adds outer border
Zebra-stripe .table-striped Adds light gray background color to odd rows (1, 3, 5, etc)
Condensed .table-condensed Cuts vertical padding in half, from 8px to 4px, within all td and th elements

Example tables

1. Default table styles

Tables are automatically styled with only a few borders to ensure readability and maintain structure. With 2.0, the .table class is required.

<table class="table">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

2. Striped table

Get a little fancy with your tables by adding zebra-striping—just add the .table-striped class.

Note: Striped tables use the :nth-child CSS selector and is not available in IE7-IE8.

<table class="table table-striped">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

3. Bordered table

Add borders around the entire table and rounded corners for aesthetic purposes.

<table class="table table-bordered">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
Mark Otto @TwBootstrap
2 Jacob Thornton @fat
3 Larry the Bird @twitter

4. Condensed table

Make your tables more compact by adding the .table-condensed class to cut table cell padding in half (from 8px to 4px).

<table class="table table-condensed">
  
</table>
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter

5. Combine them all!

Feel free to combine any of the table classes to achieve different looks by utilizing any of the available classes.

<table class="table table-striped table-bordered table-condensed">
  ...
</table>
Full name
# First Name Last Name Username
1 Mark Otto @mdo
2 Jacob Thornton @fat
3 Larry the Bird @twitter
  • 第二届中国科交会:打造粤港澳大湾区科技高地 2019-04-15
  • 23年前的今天,武汉长江二桥建成通车 江城从此告别三镇交通一线牵 2019-04-15
  • 西安培华学院招生与就业指导主任 鲍伟 2019-04-09
  • 桐庐县:互联网+社会治理的小县“大”思路  2019-04-09
  • 端午遇上父亲节,旺了周边游 2019-04-03
  • 饮料-热门标签-华商生活 2019-03-22
  • 习近平强调发展海洋经济讲话引发强烈反响 2019-03-22
  • 库里晒出自己妻子昨日在夺冠庆典上的照片 2019-03-16
  • 云南理发店老板涉嫌杀害女演员因办卡纠纷起杀心 2019-03-16
  • 迎驾贡酒生态洞藏VIP鉴赏荟合肥站启幕 2019-03-15
  • “头部内容收割机”金城:文娱投资难以忽视的真相与逻辑 2019-03-10
  • 股市涨跌都正常,但不能允许欺诈,反正欺诈发现了,国家可以罚款,但股民就白损失了,这是什么规矩? 2019-01-20
  • 新车图解:思皓E20X 这台大众有点与众不同 2019-01-20
  • 江西发现湿唇兰带叶兰分布 2018-12-27
  • 中华人民共和国防震减灾法 2018-10-21
  • 789| 299| 391| 20| 169| 985| 489| 601| 217| 675|