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-04-14
  • 吉利帝豪GSe正式上市 最大续航里程460公里 2019-04-14
  • 湖北治理违规提取公积金 防止用公积金炒房 2019-04-02
  • eHub发布“鲁班”智能营销云 重塑智能时代的商业变革 2019-04-02
  • 端午敞开玩 雨水假期末尾才来 ——凤凰网房产南京 2019-04-01
  • 再度颠覆行业玩法 vivo一年内跨越了三代全面屏 2019-04-01
  • 网约车谨防四类风险 小心遗落手机被司机私自转账 2019-03-31
  • 临汾市招商引资推介会在曲沃举行 2019-03-31
  • 在虞城,看乡村振兴的曙光 2019-03-28
  • 上海医疗机构携手日喀则人民医院造福藏地民众 2019-03-28
  • 超暖!警犬撒娇“喊累” 民警弯腰揉脸安抚 2019-03-23
  • 淮海战役中王必成两次成功阻击敌援军 2019-03-23
  • “龙江二号”微卫星传回地月合影 2019-03-20
  • 好像经济问题翻遍所有的图书馆都找不出答案,原来经济关系就在《论十大关系》数千个言辞中。 2019-03-19
  • 武汉:15个区(含开发区)大学生租赁房地图 2019-03-16
  • 647| 896| 779| 271| 851| 291| 373| 469| 627| 626|