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
 四川快乐12一定牛 www.8jc6.com <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-03-16
  • 深夜食堂?半夜吃东西真的好吗 2019-03-06
  • 男子抢劫杀人为“找钱”创业 司机装死逃命 2019-03-03
  • 睡前吃钙片、降脂药最好 服药的最佳时间点在哪? 2019-02-10
  • 第十三届全国人民代表大会常务委员会委员长简历 2019-02-10
  • 民生网——人民日报社《民生周刊》杂志官网 2019-02-08
  • 9000亿茅台、3000亿五粮液……白酒股集体大涨的背后白酒 行业 2019-02-08
  • 【新时代·幸福美丽新边疆】镜像海南 2018-11-07
  • 候选企业:泸州老窖股份有限公司 2018-10-31
  • 本文要表达的是:“是人是鬼,紧急关头——情不自禁:条件反射:‘没有思索’:自不自觉:戛然表现:原形毕露:淋漓尽致:一目了然。” 2018-10-31
  • 喀什12个贫困村实现生活垃圾集中处置 2018-10-26
  • 光明日报:救命药岂能一降价就断货 2018-09-09
  • 9年过去了 男子网坛还是费纳的天下 2018-09-09
  • 巴基斯坦塔利班头目死于美空袭 被悬赏500万捉拿 2018-08-10
  • 执导《玩具总动员》美国动画大师涉性骚扰将离职 2018-08-10
  • 518| 559| 351| 80| 425| 152| 425| 381| 918| 615|