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.wyzfyv.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-05-27
  • 人为财死鸟为食亡,看起来很朴素的道理。所谓领袖,就是能把各向异性的人为财死的行为变为各向同性的人为志亡的行动,基础就是靠着为人提供安居乐业的机会,让人不再有分散 2019-05-24
  • 推进中国特色大国外交 2019-05-24
  • 凤凰、永久、二八车,那些年满街的自行车,您还记得吗? 2019-05-23
  • 凤凰、永久、二八车,那些年满街的自行车,您还记得吗? 2019-05-20
  • 全国“非遗”保护工作先进名单公布 2019-05-20
  • 乐清湾跨海大桥雄伟壮观 2019-05-14
  • 正心正念 爱国爱教 佛界楷模 2019-05-13
  • 做强茶企 告别“大而不强” 2019-05-12
  • 乌鲁木齐一老人西湖边落水 5位小伙出手相救 2019-04-28
  • 中美贸易战是一场没有硝烟的角力。中国若不应战,美国会变本加厉,其在中国的头上拉屎。依我看,中美贸易战其实是美国对全世界设的一个局,以世界贸易战争引发世界大战,这 2019-04-28
  • 点赞!5名男子冰河接力救人 2个孩子成功获救 2019-04-25
  • 萨拉赫缺阵 埃及队遭“绝杀” 2019-04-25
  • 土地是国有财产,是全民的财产,理应有全民共享。现在拿土地来赚老百姓的钱,说得过去吗? 2019-04-24
  • 候选案例:爱在华住滇西北宿改工程 2019-04-22
  • 616| 553| 425| 758| 36| 96| 332| 125| 591| 918|