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
 四川快乐12一定牛 www.8jc6.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
  • 默滕斯神仙球卢卡库2球 比利时3 2019-05-22
  • 构建“选育管用带”培养链 磐安探索年轻干部培养“八法” 2019-05-18
  • 甘肃加强医疗器械经营使用监督检查 2019-05-18
  • “忻州工匠”“忻州技能标兵”评选活动启动 2019-05-17
  • 西溪龙舟赛 越来越多的娃娃军加入 2019-05-17
  • 特朗普下令美国防部组建第六军种“太空军” 2019-05-15
  • 內存市场反垄断调查:矛头指向美国企业 2019-05-10
  • 2015年河北省公益广告作品展 2019-05-06
  • 也门国防部说打死250名胡塞武装人员 2019-05-06
  • 【学习时刻·经济实说②】管清友:中央经济工作会议的十大亮点 2019-05-06
  • 四川医疗巡诊走进松潘为在乡优抚对象送健康 2019-04-23
  • 越南发生“反华”游行 一名美国人在胡志明市被捕 2019-04-18
  • 【94期】中国佛教走向世界:不能总盯着“佛教GDP” 2019-04-18
  • 他们是中国军人,他们2个月排除380万平方米雷场 2019-04-13
  • 风水神先生的地下工作做得不算太到位 2019-04-13
  • 969| 422| 718| 54| 711| 782| 864| 847| 624| 878|