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.e07r.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-06-13
  • 大换血!勇士8人合同到期 若处理不好将影响霸主地位 2019-06-13
  • 不是特效!上港队长一脚踢中海鸥 这脚法简直坑爹 2019-06-03
  • 中共中央组织部“12380”举报网站 2019-05-30
  • 珍惜野生动物频现甘孜境内 生态环境质量不断提升 2019-05-28
  • 颜值100分还超好吃的夏日冰棍,今年就来DIY! 2019-05-28
  • 俞正声:充分发挥统一战线组织作用,做好凝心聚力工作 2019-05-26
  • 哈哈,哈哈,你们的手段看似很高,其实一文不值,我懒得废口舌 2019-05-24
  • 5G标准出炉!与4G有啥不一样? 或1秒内下载1G电影 2019-05-24
  • 白玉兰奖何冰获最佳男主角奖 马伊琍获最佳女主角奖 2019-05-23
  • 九个字带您感知十九大报告的民生温度 2019-05-23
  • 我国成功组织航天员沙漠野外生存训练 2019-05-23
  • 南方都市报手机客户端·奥一网 2019-05-23
  • [理上网来·辉煌十九大]蔡昉:转向高质量发展“三谈” 2019-05-21
  • “一带一路”结硕果 以色列科技助力中国农业 2019-05-21
  • 325| 18| 342| 443| 924| 185| 628| 891| 638| 350|