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.9li7.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
  • 感触名家笔下的端午文化 吃香粽原来可以这样"文艺" 2019-04-19
  • 和布克赛尔县节能降耗保卫蓝天小袋子改变大世界 2019-04-19
  • 广州市见义勇为好市民揭晓 2019-04-19
  • 图解:习近平的《人民日报》情缘 2019-04-14
  • 国家公务员局调研组来抚州调研 2019-04-14
  • 一男子假冒“中将”欲在云南登机被查出:不知军改何时开始 2019-04-09
  • 11位 “小探秘员”经历的有趣的肯德基探秘之旅——食品安全频道——黄河新闻网 2019-04-09
  • 中考科目改革催热高价冲刺班 2019-04-07
  • 违法的事,我以后再也不干了「有故事的人」 2019-04-05
  • iPhone X Plus 新情报:可横屏使用 Face ID,尺寸与 iPhone 8 Plus 相当 2019-04-04
  • 网售私房粽游走法律边缘 打养生旗号难以说清依据 2019-04-04
  • “一带一路”建设与网络媒体责任论坛 2019-04-02
  • 【美丽中国长江行】航拍重庆 绿瞰山城 2019-04-01
  • 人民日报新媒体矩阵聚焦十九大 融媒报道"给你好看" 2019-04-01
  • 东风Honda INSPIRE下半年将量产 内外兼修成就旗舰 2019-03-29
  • 818| 209| 317| 94| 272| 936| 266| 455| 987| 992|