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.aor0.com.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-25
  • 抗战老兵背上挨22颗子弹幸存 被俘逃脱救妇女 2019-04-17
  • 杂粮(谷子)天气指数综合保险启动承保 2019-04-17
  • 忻州 端午节假期旅游收入达59962万元--黄河新闻网 2019-04-15
  • 北京市北京丰和天易综合店【在线咨询】 2019-04-15
  • 把市场经济说成计划经济是不是痴呆病? 2019-04-12
  • 符合条件的基层高校毕业生将获得住房等配套支持 2019-04-11
  • 实现中华民族伟大复兴是近代以来中华民族最伟大的梦想(认真学习宣传贯彻党的十九大精神) 2019-04-09
  • 合肥市长二小橡树湾校区师生携手外教端午文化体验行 2019-04-05
  • 中国古人认定:从地里所生长出来的所有生命物体都是神恩赐给人类的,人类更需要寻找机会向神祈求恩赐才能足食丰衣。这也就是中国古人认定的一个人一生所应该有的幸福。 2019-04-02
  • 指尖触碰 你我结缘丨浙江新闻4周年 我们再出发 2019-04-02
  • 人民日报创刊七十周年:风雨兼程,与党和人民同行 2019-03-29
  • 借同事新车酒驾烧毁 找同事“顶包”被识破 2019-03-29
  • 全国百家网络媒体全媒体记者彭水采风活动 2019-03-23
  • 空军“红剑-2018”演习 致力提升体系制胜能力 2019-03-23
  • 615| 485| 178| 666| 789| 838| 996| 366| 588| 371|