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
 北京赛车pk10开奖直播 www.64xd.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
  • 力度空前!个税起征点提高至每月5000元!还有这些消息与你的钱包有关 2018-10-14
  • 中超两将或联袂登场 非洲雄鹰能否再演黑马本色 2018-10-14
  • 世界杯-格子点射博格巴绝杀 法国2-1力克澳大利亚 2018-10-08
  • 无论谁说自己的理论是马克思主义理论都不算数,只有他的理论符合客观事实及其规律才是真理,否则便是谬误。 2018-10-08
  • 镜头:最勇敢的“逆行者” 永远在守护 2018-10-05
  • 异类非人思维。如一尼安德特人从2万年前发出的声音。 2018-10-05
  • 1至5月我区为企业和社会减负4200余万元 2018-10-04
  • 蒋易帅气亮相时尚活动 帅气男神霸气十足 2018-10-04
  • 50条冬游线路邀市民畅游京郊 2018-09-30
  • 外交部部长王毅就“中国外交政策和对外关系”回答中外记者提问 2018-09-30
  • 怎么偷梁换柱?请具体说明[微笑] 2018-09-28
  • 全国政协常委、中国石油大学(北京)校长张来斌谈“贯彻五大发展理念 推进高校改革发展” 2018-09-28
  • 政协网络在线-天山网 2018-09-28
  • 高清:2018年俄罗斯世界杯正式开幕 罗纳尔多亮相 2018-09-28
  • 女性之声——全国妇联 2018-09-23
  • 481| 645| 761| 225| 999| 576| 637| 709| 833| 295|