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
  • 特兰加雄狮16年后二征世界杯 黑马基因再爆发? 2019-04-22
  • “云南导游辱骂威胁游客案”一审宣判:游客消费不达标  导游言语侮辱 2019-04-22
  • 2017大皖客户端徽派栏目全面回顾宣传片 2019-04-21
  • 贵州茅台一季报点评:稳价策略下增长更持续报告 公司 2019-04-21
  • 发布“最美科技工作者”先进事迹 2019-04-18
  • 航天科工发布“CMSS云制造支持系统”  打造云制造集群生态 2019-04-17
  • 吕梁:临县一女子车辆被贴罚单后网上辱骂交警被查处 2019-04-17
  • 超载集卡行驶途中突燃大火 左后轮胎剧烈燃烧 2019-04-15
  • 世相【镜头中的陕西人】 2019-04-14
  • 上海合作组织青岛峰会举行 2019-04-14
  • 一步之遥的龙头之争:万科VS碧桂园 ——凤凰网房产成都 2019-04-11
  • 一线城市,已不适合传统超市生存 2019-04-11
  • 王水平当选宜春市人民政府市长 2019-04-10
  • 印尼小蛇大胆搭乘鳄鱼“顺风车”探路 2019-04-09
  • 云南导游辱骂威胁游客案一审宣判 导游获刑6个月 2019-04-09
  • 252| 866| 258| 889| 610| 229| 121| 873| 925| 702|