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
 广西快3遗漏值 www.xg5k.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-09-19
  • 暖!高速路收费员为除雪推迟订婚  同事为其策划雪中求婚仪式 2018-09-19
  • 聚焦三大任务 走好新征程——山西黄河新闻网 2018-09-06
  • G7峰会期间那张著名的刷屏照片......反转了? 2018-09-06
  • 人民论坛:“创新从来都是九死一生” 2018-09-04
  • 中欧艺术双年展主打文化记忆 2018-08-16
  • 宁波上周理财收益率有升有降 6月末回暖仍然可期 2018-08-06
  • 上海发布分时租赁细则 需标配人脸识别 2018-08-06
  • 统一战线是党的重要法宝论断的由来 2018-07-31
  • 它从未改变 人民网试驾广汽本田第十代雅阁 2018-07-31
  • “互联网+农村”亟待提速 网络入户遇两大难题 2018-07-20
  • 这所大学的“弹幕墙”火了,毕业生们写了这些话... 2018-07-20
  • 【理上网来·喜迎十九大】“引进来”与“走出去”水平不断提高:我国吸收外资及对外投资情况“亮点纷呈” 2018-07-15
  • 666| 338| 962| 848| 718| 635| 732| 88| 185| 890|