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.9li7.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
  • 端午小长假 游人“醉”西湖 2018-12-01
  • 70期:开创了中国人太空“开飞船”历史的刘旺 2018-12-01
  • 基因检测能“解码生命”吗(关注) 2018-10-14
  • 品冠为女儿Vivian做弥月蛋糕 工作繁忙连飞36小时 2018-10-14
  • 阿呆,只看了你的标题,主贴没看,木有价值,可以肥田。[哈哈] 2018-09-26
  • 白蚁斗士感慨: 杭州环境越来越 利于白蚁繁殖 2018-09-15
  • 情浓端午——临汾建设社区15分钟便民服务志愿者在行动 2018-09-06
  • 重判梁天琦法官遭网络暴力 港司法机构:已转律政司跟进 2018-08-24
  • 河南创新开展统一战线“同心共建、企地共赢”活动 2018-08-24
  • 小黄车霸王条款藏这儿:扫到故障车照收费 法院管不了 2018-07-26
  • 言而无信似乎成了特朗普政府的特质与标致 2018-07-26
  • 减重5%带来的神奇变化 你还要继续胖着吗 2018-07-18
  • 高清:国青足球邀请赛 国青1 2018-07-18
  • 网友飞机偶遇出门工作的王菲,天后坐姿慵懒霸气,素颜也很美 2018-07-06
  • 662| 914| 170| 46| 876| 469| 422| 559| 150| 830|