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.xw6il.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
  • 梁翘柏晒与王菲合照 配文工作愉快引期待 2018-12-04
  • [微笑]所谓的卖地,表面上卖的是土地,实际上卖的是关联资源!这就是为什么同样面积的土地处于不同的城市不同的地段,价值可以有云泥之别的原因。 2018-12-04
  • 尖端科技为传统保险业“赋能” 2018-10-20
  • 昆明 —频道 春城壹网 七彩云南 一网天下 2018-10-19
  • 变味的代步车 春城壹网 七彩云南 一网天下 2018-10-18
  • 特朗普所谓交易的艺术,实质上是勒索的艺术。 2018-10-18
  • 西安紫云溪小区深夜有人竟高空扔粪便 律师:违法行为 2018-10-17
  • 市第六十六中学举办“防治结核病”讲座 2018-10-14
  • 第521期:常吃菠菜能抗氧化、抗肿瘤 到底能不能补铁? 2018-10-14
  • 土豆姐姐冯小燕的新农人梦 2018-10-01
  • 《社区矫正刑罚执行工作规范》日照市地方标准发布 2018-09-21
  • 回复@老老保老张工:计划不要批准?那不还是你自己做主?有必要走形式么? 2018-09-21
  • 中华人民共和国“友谊勋章”首次颁授仪式 2018-09-20
  • 养生谣言肆虐 微信圈不可全信 2018-09-20
  • 《国家人文历史》2018年第4期封面及目录 2018-09-19
  • 564| 158| 218| 460| 956| 276| 184| 884| 127| 452|